Skip to content

Intro

Let's finally start typing! All commands in this guide are for Bash (the default on most Linux systems).

Command Anatomy

Every command you'll type follows the same pattern:

COMMAND [...OPTIONS] [...ARGUMENTS]
   ↓          ↓            ↓
  What       How         Where

[ ] means optional. You don't always need options or arguments. ... means multiple.

Example:

Part Meaning Example: ls -l Documents/
COMMAND What you want to do ls (list files)
OPTIONS How to modify the command -l (long/detailed format)
ARGUMENTS Where it applies Documents/ (the folder)

Multiple Options

You can use more than one option at a time.

ls -l -a -h

Combine options:

Order does not matter: -lah, -lha, -alh - all work the same.

Check Your Understanding

Even without knowing these commands, you can figure out each part just by looking at the pattern.

What is the command? What is the option? What is the argument?

1. Command

pwd
Reveal Answer
  • Command: pwd
  • Options: none
  • Arguments: none

2. Command

ls -lh stuff/
Reveal Answer
  • Command: ls
  • Options: -lh
  • Arguments: stuff/

3. Command

ls -a
Reveal Answer
  • Command: ls
  • Options: -a
  • Arguments: none