Linux command anatomy: name, options and arguments
Updated November 1, 2026
A Linux command is the name of a program followed by options and arguments.
Syntax
name [options] [arguments]Common cases
ls # the name alone
ls -l # the -l option changes the output
ls -l /etc # option and argument: what to show
mkdir d && cd d # && chains commands togetherSample output
$ ls
notes.txt reports todo.md
$ ls -l
total 4
-rw-r--r-- 1 student student 3 Jul 26 12:10 notes.txt
drwxr-xr-x 1 student student 0 Jul 26 12:10 reports
-rw-r--r-- 1 student student 0 Jul 26 12:10 todo.md
$ ls -l reports
total 0How it works: options, arguments and chains
An option (
-l,--all) changes how a command behaves; an argument (/etc, a file name) says what to act on. Short options can be bundled:ls -lais the same asls -l -a. Operators join commands:;runs them in turn,&&runs the next only if the previous succeeded,||runs it only if the previous failed.
Common mistakes
The space between the name and the option is not optional. To the shell ls-l is a command name of its own, so the answer is bash: ls-l: command not found. A typo in the name gives the same message, mdkir instead of mkdir. When you are sure the command is installed, look at the spaces and the letters in the name before you look at PATH.
A long option takes two dashes. rm -recursive reports answers rm: invalid option -- 'e': with one dash every letter is read as a separate short option, and parsing stops at the first unknown one. It is worse when every letter happens to exist: ls -all prints no complaint, but it means -a -l -l, not --all, so you get the long format with hidden files instead of the plain list.
An argument with a space inside is two arguments. cat my file.txt looks like two file names to the command, so it answers twice: cat: my: No such file or directory and cat: file.txt: No such file or directory. Quotes join the name back together: cat "my file.txt".
Used in
You need this in the lesson The command line. The theory is the chapter The command line: first contact.
See also
The echo command, Redirection > and >>.
Try it
Open the sandbox: a real throwaway Linux terminal in your browser. Run the commands above by hand - the container is deleted when you leave.