As a start to using shell I recommend learning (roughly in order): man grep sed find piping and redirect xargs looping Knowing the basics of those unlocks a lot of the power of the shell. You can you them to brute force your way through most problems as you learn more.
Most Important Linux Commands Cheatsheet
11–13 of 13 posts
Re: Most Important Linux Commands Cheatsheet
#12Pedantic note about ctrl+d: it doesn’t mean logout. It sends and EOF character. Said EOF is honoured by your TTY, which closes the FD this ending the session. You can see this by typing `cat -` and ending it with ctrl+d. The windows equivalent is ctrl+z.
$ cat
something^Dsomething^D
$ cat
VEOF causes the tty driver (tty(4)) to send “something” to cat immediately; and cat echoes that back out to the terminal as intended.If there’s nothing in the line-buffer (because you pressed VEOF at the start of the line) then read(2) returns 0, which is interpreted as an end-of-file condition by your libc in fread() and friends.
You can checkout OpenBSD’s termios(4) for a more detailed explanation :)
Re: Most Important Linux Commands Cheatsheet
#13If you need something like dd, or any of the "real programming" stuff like if statements and xargs, you probably really love it all and will find it yourself. If you just do a few things in shell and use Python and GUI for the rest, these Are the main ones.
Slightly less common ones I'd add:
kill and killall
ps -aux | grep APPNAME
(Technically not a single command, but it's 90% of my use of ps or grep, so it might as well be it's own command)
cowsay, fortune, neofetch, and lolcat, sl
Not actually included in shell but people should know about them anyway.
It's said that Arch users are legally required to stare at the output of neofetch once per hour at minimum.
Various systemctl commands:
start, stop, status, enable, disable, mask
systemd-analyze critical-chain
nmtui (Not sure which distros include this by default and which don't)
dmesg
journalctl, dmesg
sudo reboot now
sudo shutdown now
units (Usually not included, gotta install it)
ping, ip a
Also, this would be fantastic to include in educational material or even add directly to a distro. Does it have a license?