Here are links to some useful Linux tips:
https://www.cyberciti.biz/faq/linux-unix-appleosx-bsd-cat-command-examples/
https://peteris.rocks/blog/htop/
https://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/
https://www.cyberciti.biz/faq/using-sed-to-delete-empty-lines/
https://www.cyberciti.biz/faq/linux-hide-processes-from-other-users/
https://www.cyberciti.biz/faq/bash-check-if-process-is-running-or-notonlinuxunix/
https://www.cyberciti.biz/faq/unix-linux-bsd-appleosx-bash-assign-variable-command-output/
https://bash.cyberciti.biz/file-management/linux-shell-script-to-reduce-pdf-file-size/
https://www.cyberciti.biz/faq/bash-file-command-not-found-how-to-install-file/
https://www.cyberciti.biz/faq/set-up-a-basic-iptables-firewall-on-amazon-linux-ami/
https://www.cyberciti.biz/faq/fedora-redhat-centos-5-6-disable-firewall/
https://hackertarget.com/ossec-introduction-and-installation-guide/
Awesome. VIM “for people who don’t want to use it , but have to…”. Or see my page https://www.cyberciti.biz/faq/linux-unix-vim-save-and-quit-command/
sudo is the right choice for granting admin rights on the CentOS Linux 8 server. Learn how to create a new user and grant her admin rights https://www.cyberciti.biz/faq/add-create-a-sudo-user-on-centos-linux-8/
643 Comments
Tomi Engdahl says:
How to monitor your Linux servers with Checkmk
https://www.techrepublic.com/article/how-to-monitor-your-linux-servers-with-checkmk/
Find out how to set up the powerful Checkmk monitor to keep tabs on all of your networked servers.
Tomi Engdahl says:
jq is a Linux/Unix or macOS/*BSD CLI utility efficiently extracts data from JSON documents. Now we have an excellent htmlq utility written in Rust Lang. It is like jq but for HTML documents. https://www.cyberciti.biz/open-source/command-line-hacks/using-htmlq-to-extract-content-from-html-files-on-linux-unix/
Tomi Engdahl says:
Did you know? You can use ‘nethogs’ that shows the bandwidth usage per *process* on #Linux. https://www.cyberciti.biz/faq/linux-find-out-what-process-is-using-bandwidth/
Tomi Engdahl says:
Want to find your Linux distro name and version? Try universal method: cat /etc/os-release
Another option for systemd based distros:
hostnamectl
The following may not work on all distros:
lsb_release -a
See https://www.cyberciti.biz/faq/find-opensuse-suse-enterprisel-inux-version-command/ for more info.
Tomi Engdahl says:
error messages Also do check Linux error logs related commands https://www.cyberciti.biz/faq/linux-log-files-location-and-how-do-i-view-logs-files/
Tomi Engdahl says:
How VPN works. These days I like WireGuard very much https://www.cyberciti.biz/faq/ubuntu-20-04-set-up-wireguard-vpn-server/ It is like SSH only. #Linux #unix #FreeBSD
Tomi Engdahl says:
Let us see how to make, list snapshots for LXD and automatically expires them too on #Linux https://www.cyberciti.biz/faq/how-do-i-list-lxc-snapshots-for-lxd-on-linux/ #container #SysAdmin
Tomi Engdahl says:
Did you know? When you exit a login Bash session/shell, you can run commands on macOS/Linux/Unix. Useful to remove bash/mysql history or run backup job so that files are backed up as soon as you exit a login shell:
cat ~/.bash_logout
See https://bash.cyberciti.biz/guide/.bash_logout for more info.
Tomi Engdahl says:
https://www.cyberciti.biz/faq/repeat-a-character-in-bash-script-under-linux-unix/
Tomi Engdahl says:
https://www.cyberciti.biz/open-source/command-line-hacks/adding-spice-to-your-sudo-session-with-a-lecture-file-on-linux-or-unix/
Tomi Engdahl says:
Want to see a tree of processes on your #Linux and #Unix box? Try the pstree command.
https://www.cyberciti.biz/faq/unix-linux-pstree-command-examples-shows-running-processestree/
Tomi Engdahl says:
https://www.zdnet.com/article/linux-boosts-microsoft-ntfs-support-as-linus-torvalds-complains-about-github-merges/
Tomi Engdahl says:
https://www.cyberciti.biz/faq/linux-execute-cron-job-after-system-reboot/
Tomi Engdahl says:
How To Use Bash Parameter Substitution Like A Pro
https://www.cyberciti.biz/tips/bash-shell-parameter-substitution-2.html
Tomi Engdahl says:
It is not UNIX’s job to stop you from shooting your foot. If you so choose to do so, then it is UNIX’s job to deliver Mr. Bullet to Mr Foot in the most efficient way it knows.
https://www.cyberciti.biz/humour/terry-lambert-quote-it-is-not-unixs-job-to-stop-you/
Tomi Engdahl says:
PS4 Emulator for Linux Now Plays Hundreds of Games
By Michelle Ehrhardt 13 days ago
Just Don’t expect God of War to be one of them.
https://www.tomshardware.com/news/spine-ps4-emulator-linux-plays-hundreds-of-games
Tomi Engdahl says:
Making Linux Offline Voice Recognition Easier
https://hackaday.com/2021/09/25/making-linux-offline-voice-recognition-easier/
Tomi Engdahl says:
https://haydenjames.io/free-vs-available-memory-in-linux/
Tomi Engdahl says:
https://www.facebook.com/126000117413375/posts/4969787616367910/
I use my Unix laptop as server and when power goes out for an extended time i get various alert on my mobile and email https://bash.cyberciti.biz/monitoring/shell-script-to-shutdown-freebsd-laptop-when-low-on-battery-power/ Poor man’s solution
Tomi Engdahl says:
Want to use ffmpeg to accelerate video encode and decode with an NVIDIA GPU on Linux? Try these tips about installing and usage the ffmpeg with NVIDIA GPU https://www.cyberciti.biz/faq/how-to-install-ffmpeg-with-nvidia-gpu-acceleration-on-linux/5
Tomi Engdahl says:
{nixCraft Patreon supporters content} This guide explains how to use USBGuard to configure the Linux server or desktop dynamic policy to block, reject, or permit access to specific USB devices. https://www.opensourceflare.com/how-to-protect-linux-against-rogue-usb-devices-using-usbguard/
Tomi Engdahl says:
Want to stress test your CPU and Memory On a Linux, FreeBSD or Unix-like systems? Try stress-ng https://www.cyberciti.biz/faq/stress-test-linux-unix-server-with-stress-ng/
Tomi Engdahl says:
xRDP – Allow multiple sessions (local and remote) for the same user – HowTo
https://c-nergy.be/blog/?p=16698
Tomi Engdahl says:
Linux Shell Scripting Tutorial (LSST) v2.0
https://bash.cyberciti.biz/guide/Main_Page
Tomi Engdahl says:
Lead or follow? this decade’s dilemma for GNU/Linux based ICT industry
https://medium.com/think-do-tank/lead-or-follow-the-dilemma-of-ict-industry-for-the-coming-decade-4f83ee1851bc
Tomi Engdahl says:
Still have a problem checking FB or any other site due to DNS outages? Check TTL which defines how long a resolver supposed to cache the DNS query before the query expires using the dig command without visting any website as this will check your local DNS resolver typically hosted by wifi/router:
dig +nocmd +noall +answer +ttlid A facebook.com
Check https://www.cyberciti.biz/faq/how-to-see-time-to-live-ttl-for-a-dns-record/ detailed explanation. #Linux #macos #Unix
Tomi Engdahl says:
{updated} how to search and remove files with one #Linux or #Unix command on fly
https://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/
Tomi Engdahl says:
cpufetch is a new tool to display info about your #Linux and #macOS CPU
https://www.cyberciti.biz/open-source/install-cpufetch-on-linux-macos-android-to-get-cpu-architecture-info/
Tomi Engdahl says:
Microsoft releases Linux version of the Windows Sysmon tool https://www.bleepingcomputer.com/news/microsoft/microsoft-releases-linux-version-of-the-windows-sysmon-tool/
Microsoft has released a Linux version of the very popular Sysmon system monitoring utility for Windows, allowing Linux administrators to monitor devices for malicious activity.
Microsoft has released a Linux version of the very popular Sysmon system monitoring utility for Windows, allowing Linux administrators to monitor devices for malicious activity.
For those not familiar with Sysmon (aka System Monitor), it is a Sysinternals tool that monitors a system for malicious activity and then logs any detected behavior into system log files.
Sysmon’s versatility comes from the ability to create custom configuration files that administrators can use to monitor for specific system events that may indicate malicious activity is occurring on the system.
https://github.com/Sysinternals/SysmonForLinux
Tomi Engdahl says:
https://www.tecmint.com/find-out-which-process-listening-on-a-particular-port/
Tomi Engdahl says:
https://www.cyberciti.biz/faq/how-can-i-log-in-as-root/
Tomi Engdahl says:
https://hackaday.com/2021/08/16/linux-fu-walk-chew-gum/
If you ever think about it, computers are exceedingly stupid. Even the most powerful CPU can’t do very much. However, it can do what it does very rapidly and repeatably. Computers are so fast, they can appear to do a lot of things at once, too and modern computers have multiple CPUs to further enhance their multitasking abilities. However, we often don’t write programs or shell scripts to take advantage of this. However, there’s no reason for this, as you’ll see.
Bash Support
It is surprisingly easy to get multiple processes running under Bash.
Wrap Up
It is easy to forget that you can do more than one thing at a time pretty easily. Of course, this also opens up a whole new realm of problems. If you need to protect your programs from each other, check out our earlier post about critical sections. Not everyone thinks bash is a great programming language, but it is surprisingly capable and while it might not be good for everything, it is great for some tasks.
https://hackaday.com/2020/08/18/linux-fu-one-at-a-time-please-critical-sections-in-bash-scripts/
Tomi Engdahl says:
https://unix.stackexchange.com/questions/284934/return-owner-of-process-given-pid/284938
Tomi Engdahl says:
https://unix.stackexchange.com/questions/284934/return-owner-of-process-given-pid
Tomi Engdahl says:
https://stackoverflow.com/questions/2229336/linux-application-profiling
https://en.wikipedia.org/wiki/Gprof
Tomi Engdahl says:
https://stackoverflow.com/questions/2229336/linux-application-profiling
https://en.wikipedia.org/wiki/Gprof
https://sourceware.org/binutils/docs/gprof/Flat-Profile.html
https://www.howtoforge.com/tutorial/how-to-install-and-use-profiling-tool-gprof/
Tomi Engdahl says:
Core dump file analysis
https://stackoverflow.com/questions/5115613/core-dump-file-analysis
Tomi Engdahl says:
https://users.cs.duke.edu/~ola/courses/programming/gprof.html
Tomi Engdahl says:
Using GNU Profiling (gprof) With ARM Cortex-M
Learn how to profile an embedded application on ARM Cortex-M devices using GNU gprof.
https://dzone.com/articles/using-gnu-profiling-gprof-with-arm-cortex-m
Tutorial: Using GNU Profiling (gprof) with ARM Cortex-M
https://mcuoneclipse.com/2015/08/23/tutorial-using-gnu-profiling-gprof-with-arm-cortex-m/
Tomi Engdahl says:
https://www.cyberciti.biz/faq/howto-iptables-show-nat-rules/
Tomi Engdahl says:
IPv6 bridge and IPv4 router (NAT) shell script for OpenWRT
https://github.com/cvmiller/v6brouter
Tomi Engdahl says:
https://opensource.com/article/17/6/5-totally-incorrect-ways-exit-vim
Tomi Engdahl says:
The du command for #Unix was written on November 3, 1971. It is 50 years ago. Almost as old as me lmao. Happy birthday du command. https://www.cyberciti.biz/faq/unix-disk-usage-command-examples/ I like duf more https://www.cyberciti.biz/open-source/command-line-hacks/duf-disk-usage-free-utility-for-linux-bsd-macos-windows/ but some prefer to use the ncdu on #Linux https://www.cyberciti.biz/open-source/install-ncdu-on-linux-unix-ncurses-disk-usage/ What do you prefer to use on your Unix/macOS/Linux system?
Tomi Engdahl says:
HowTo: Linux Check Password Strength With Cracklib-check Command
Author: Vivek Gite
https://www.cyberciti.biz/security/linux-password-strength-checker/
Tomi Engdahl says:
compgen: An Awesome Command To List All Linux Commands
https://www.cyberciti.biz/open-source/command-line-hacks/compgen-linux-command/
Tomi Engdahl says:
Here is a pro tip: Learn how to get pretty ‘syntax’ highlighting with using the diff command to compare file line-by-line on your #Linux, #macOS and #Unix like systems.
https://www.cyberciti.biz/programming/color-terminal-highlighter-for-diff-files/
Tomi Engdahl says:
{updated} How To Use grep Command In Linux / UNIX With Practical Examples https://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/
Tomi Engdahl says:
Did you know? You can generate random bonsai (盆栽) trees on your Linux and Unix system for fun https://www.cyberciti.biz/open-source/cbonsai-linux-bonsai-tree-generator-for-cli-lovers-for-fun/ Try it out.
Tomi Engdahl says:
Did you know? Man pages on Linux and Unix-like systems such as macOS/*BSD don’t have to be dull black and white. You can get color output in the console when using the man command:
export MANPAGER=”less -R –use-color -Dd+r -Du+b”
man bash
See https://bash.cyberciti.biz/guide/Man_command#Color_output_in_the_console for info.
Tomi Engdahl says:
OpenSSH is critical for #Linux and #Unix servers including desktop systems such as macOS or WSL. However, misconfig can create issues. But fear not, you can audit the SSH server and client config easily. You don’t have to be a security guru for that. New developers and sysadmins can look for security and other issues. https://www.cyberciti.biz/tips/how-to-audit-ssh-server-and-client-config-on-linux-unix.html