Getting to the Essential ones…
- find | xargs
- df -H
- du -cks * | sort -n
- z* (zgrep, zcat, etc)
- tail -f, head
- ps auxf (f only on GNU)
- kill, -HUP, -9
- /etc/init.d/ scripts
- Z, fg, jobs, &
- The knowledge that bash is a programming language that provides all your basic constructs (ifs, loops, variables, functions), but instead of having a library of functions, you execute simple programs instead
- <, >, >>
- - as stdin, e.g. “cat somefile.txt | vi -“
- for i in a b c d; do echo $i; something_else $i; done
>> screen is an excellent command (won’t have to use nohup again), if you don’t have it you should install it and try it.
If you’re on a Red Hat based distro, yum and rpm are good to know. If it’s Debian based, apt-get and dpkg for installing stuff.
>> ping, traceroute, ifconfig are all handy for networking stuff.
>> grep for searching, top and ps for process monitoring (definitely look into htop its a much nicer version of top but you may need to enable additional 3rd party repositories if using yum or apt-get). There are tons, I guess those are some of the more common ones I use (not including the basic ones like cd, pwd, cp, mv, ls, etc).
Also i’d like to mention few (Not a command,) but there are loads of handy bash (well, readline) key sequences that make editing commands much easier. You’ll also feel right at home if you’re an Emacs user. A few of the more common ones:
C-a - Start of line C-e - End of line C-k - Kill to end of line C-u - Kill to start of line Alt-d - Kill word forwards C-w - Kill word backwards C-/ - Undo C-t - transpose characters
(C-x means CTRL-x, btw)
>> netstat -tulp # what is listening on which port
>> tmux # screen alternative, probably superior(and nicer looking)
>> lsof somefile/folder # which process is using this file/folder/device
>> top -b | grep processname # continuous info about a process, you have to Ctrl+C out of it though
>> nmap -sS -sV -O localhost # local listening ports and what versions of daemons are running, much more I can’t think of right now :)