Cheatsheet

“UNIX is simple and coherent, but it takes a genius (or at any rate, a programmer) to understand and appreciate its simplicity.” — Dennis M. Ritchie

This page lists fundamental utilities and gives a short summary of their purpose:

Note: The utilities (both as standardized and as commonly implemented) typically support many more options than shown. Only canonical invocations and their most important related options are listed.

Unix Magic by Gary Overacre
By Gary Overacre. Copyright © 1986 Unitech Software.

Shell scripting

Man pages

Text processing

Traditional

Modern

Inspecting contents of the file system

Traditional

Modern

Modifying contents of the file system

Traditional

Modern

Block devices

Account and privilege control

Process management

Traditional

Modern

systemd

Service management

Logs

System

Misc

  1. 9 times out of 10, you want to use -r.

  2. The brackets [ ... ] do not designate an optional expr. These are literal brackets. This isn't special syntax, you actually are invoking a program called [ and the balancing right bracket ] is the last argument to the command. And yes, there is a /bin/[!

  3. These are just hand-picked examples which are most frequently used in practice. There's much more, read the standard and/or man page. 2 3 4 5 6 7 8 9 10

  4. Only suitable for interactive use, poorly portable even among implementations which support the option, see here. 2 3