Bash Command Line Cheat Sheet

by Justin Li <justinnhli@oxy.edu>, 2018-10-03

Most commands looks like this: ls -l code

  1. The first part (ls) is the command. Different commands do different things.
  2. The second part (-l) is an option. They change how the commands work.
  3. The third part (code) is an argument. They specify what the command acts on.

Options are always optional. Some commands (and some options) have required arguments. In this cheat sheet, <argument> means that the argument is required; [argument] means that the argument is optional.

Getting Help

Stopping

File Navigation

File Manipulation

Text Manipulation

System Status

Other Utilities

Advanced Topics

Other Resources