The following is a preliminary list of things that it would be useful to know when using Unix on the command line, especially when developing software or doing system administration. It's not a tutorial: the very basic thing you should know is how to find documentation for these kinds of things. It's assumed that you k

  • Shell command line editing.
    • control-R, possibly !foo history commands of various forms
    • pushd, popd, "cd -" for moving around directories; also, opening new tabs in your terminal emulator
    • using TAB completion efficiently, both for filenames and other stuff
    • configure your shell prompt to be useful without being distracting (e.g., make it be in bold face so you can easily see where you've entered commands in a long scrollback in the terminal; and make it show when commands return non-zero exit codes; etc)
  • Editing.
    • learn at least the basics of vi: how to move around, search, insert and delete text, and move blocks of text around; you'll eventually need it to fix things remotely without any other editor being available
    • try various editors, pick one you like, and learn that well, including how to extend it so that you can automate those things you do frequently (might be just to pipe selected text through shell commands)
  • Avoiding stupid disasters.
    • do not run anything as root unless you need to do it
    • do not mess about on development servers; especially do no software development on servers
  • X
    • learn to do copy-paste in X (with or without the clipboard)
    • use pastebin services (possibly set one up for private use)
    • even if you're using X, learn to love screen(1)
  • Doing stuff with files.
    • learn basic command line operations: ls, mv, cp, rm, tar
    • learn to love rsync, scp, and sftp
    • learn to love find (including "-exec foo +"), xargs, and parallel, and delimiting filenames with zero bytes instead of newlines/whitespace
  • Scripting.
    • use "set -e" in all shell scripts
    • use "set -x" or "sh -x" whenever debugging
    • consider using a proper language instead of shell (Python, perl, Ruby, or whatever you fancy): writing safe shell is hard; learn to recognize common pitfalls when writing shell scripts
    • learn to write for and while loops, pipes, and how to deal with variables
    • learn to use "trap" to clean up properly, including when the script fails
    • learn to love at least one of sed+awk and perl
  • Basic system administration
    • install software with the package manager, if only so you can easily uninstall; learn to build simple packages, and to backport newer versions when necessary
    • design a way to keep your configurations and personal utility scripts up to date across all the machines you use regularly
  • Version control.
    • learn git, even if you prefer to use something else (everyone else is going to be using git); git documentation sucks worse than a hull breach in outer space, but read it anyway
    • learn more than just the basics of your preferred version control system, e.g., "git grep"