Commands as Verbs
When you type a command in the terminal, you're constructing a sentence. The command itself is the verb — the action you want to perform. Everything else describes how to perform it and what to perform it on.
The Structure of a Command
Most commands follow this pattern:
command [options] [arguments]
- Command — the action (verb): list, copy, move, delete
- Options — modifiers that change behavior (adverbs): quietly, recursively, verbosely
- Arguments — the targets (nouns): files, folders, text
For example, ls -l documents breaks down as:
ls— list (the action)-l— in long format (how to do it)documents— the folder to list (what to act on)
Common Command Verbs
Here are actions you'll encounter frequently:
| Command | Action |
|---|---|
ls / dir | List contents |
cd | Change directory |
cp / copy | Copy files |
mv / move | Move or rename |
rm / del | Remove (delete) |
cat / type | Display file contents |
mkdir | Make directory |
Options Modify Behavior
Options (also called flags) typically start with a dash. They tell the command how to perform its action.
The -l option transforms a simple list into detailed information including permissions, size, and dates.
Arguments Specify Targets
Arguments tell the command what to act on. Without arguments, many commands act on the current directory or require you to specify something.
cp report.txt backup/report.txt
Here, cp (copy) has two arguments: the source file and the destination.
Reading Command Syntax
Documentation often shows commands like this:
cp [options] source destination
Square brackets mean optional. Words in italics or lowercase describe what you should provide. This tells you cp requires a source and destination, with optional flags in between.
The Grammar Analogy
Think of commands as simple sentences:
rm file.txt→ "Delete file.txt"cp -r projects backup→ "Copy projects to backup, recursively"ls -la /home→ "List /home, showing all files in long format"
Once you see commands as structured sentences, reading and writing them becomes intuitive.