Command names, options, arguments and help
Read a command before running it and use built-in help to verify its grammar.
- Identify the command name, options and arguments in a short command line.
- Use the command's own help before relying on remembered syntax.
- Terminal
- Command
- File
- Folder
On this page
Read the structure first
Consider this Linux-shell command:
ls -l notes
│ │ └── argument: the item to inspect
│ └───── option: changes the form of the result
└──────── command name: selects the operation
An option changes how an operation behaves. An argument supplies a target or value. The exact grammar belongs to that command; not every tool uses the same option style.
Verify the grammar
Use documentation provided by the command or its environment:
| Environment | Typical help route | What it answers |
|---|---|---|
| Linux shell | command --help or man command | Accepted options, arguments and examples |
| PowerShell | Get-Help Command-Name | Syntax, parameters and examples |
| Windows CMD | command /? | Command syntax and switches |
These forms are conventions, not universal laws. If one form fails, consult the platform's official documentation rather than guessing another option.
Output and exit status
Text printed to the terminal is output. Separately, a command returns an exit status to the shell. A command can print nothing and still succeed; it can also print a useful message and still report failure. Verify the resulting state when the command changes something.
Practise reading commands
Before each command, say aloud:
- the command name;
- each option;
- each argument;
- what you expect to observe or change.
Apply the same reading method to small, reversible changes in the deterministic simulator.