Appendix A. Linux Refresher

If your Linux skills are rusty, here’s a very quick review of some details you’ll need for this book. (If you’re a complete beginner, this review might be too brief. Check out the recommended reading at the end.)

Commands, Arguments, and Options

To run a Linux command at the command line, type the command and press Enter. To kill a command in progress, press Ctrl-C.

A simple Linux command consists of a single word, which is usually the name of a program, followed by additional strings called arguments. For example, the following command consists of a program name, ls, and two arguments:

$ ls -l /bin

Arguments that begin with a dash, such as -l, are called options because they change the command’s behavior. Other arguments might be filenames, directory names, usernames, hostnames, or any other strings that the program needs. Options usually (but not always) precede the rest of the arguments.

Command options come in various forms, depending on which program you run:

  • A single letter, such as -l, sometimes followed by a value, as in -n 10. Usually the space between the letter and the value can be omitted: -n10.

  • A word preceded by two dashes, such as --long, sometimes followed by a value, as in --block-size 100. The space between the option and its value may often be replaced by an equals sign: --block-size=100.

  • A word preceded by one dash, such as -type, optionally followed by a value, as in -type f. This option format is rare; one command that ...

Get Efficient Linux at the Command Line now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.