17. Appendix 2: Using Unix

This appendix provides an overview of using the Unix command line and some useful Unix commands and utilities. Our focus is on Linux, which is representative of the command line interface to a broader set of Unix operating systems. Different Unix implementations may have subtle differences, but almost all of what we present here is the same across different Unix implementations. Our coverage is meant as an introduction to these topics, providing references to more advanced and in-depth coverage elsewhere. The topics we cover include the following:

  • The Unix file systems and using the Unix command line (includes commands: ls, pwd, mkdir, cp, mv, rm, rmdir, cat, echo, wc, touch).

  • The Unix manual and reading Unix man pages (man, apropos).

  • Remotely accessing Unix systems (ssh and scp).

  • Unix text editors with some information about learning the vim (and vi) editor.

  • Using make and writing Makefiles.

  • Some advanced command line features and utilities including:

    • searching files and directories: grep and find.

    • process control and running (ps, &, fg, bg, CNTRL-Z, kill, history, time).

    • archive files (tar) and file compression (gzip, bzip2).

    • file permissions (chmod, ls -l).

    • I/O redirection (<, 1>, 2>, &>, >>) and pipes (|).

    • dot files, .bashrc, environment variables

    • writing and using simple Bash shell scripts.

    • utilities for getting information about the state of the system (top, /proc).