Linux Commands, Options, and Arguments Explained
A command has three parts: the command, options, and arguments. From these, the command is compulsory. Options and arguments are optional. They add and remove information to and from the output. They allow us to format the output in a specific manner.
Command
When we hit the Enter key after typing a word on the command prompt, the shell interprets it as a command. It finds a file or a script matching the typed word in pre-defined directories. To view the pre-defined directories, use the following command.
$echo $PATH
If it finds a matching script, it executes the script. If not, it returns the error message command not found. Let us take an example. Execute the following commands on the command prompt.
$ls $list

The shell has a script file named ls, but it does not have any file or script named list. Since it has a script file named ls, it executes the first command and returns an error for the second command.
Options
Options modify the default behaviour of the command. They are optional. They are also known as switches. There are three ways to specify options for the command. These are without a hyphen sign, with a single hyphen sign and with double hyphen signs.
The following are examples of these methods.
$ls $ls -l $ls --inode

By default, the ls command lists the contents of the current directory.
In the first command, we did not use any option. So, it displayed all the contents of the current directory.
In the second command, we used the -l option. It is an example of a single hyphen sign option. When we use it, the ls command displays contents with their properties in a list format.
In the third command, we used the --inode option. It is an example of a double hyphen sign option. When we use this option, the ls command displays the inode number and its contents.
Arguments
Arguments are the input of the command. Everything we specify after the command is an argument (including options). Technically, all options are arguments. But all arguments are not options.
Options only modify and format the output. They do not control or specify a target for the command. Arguments do these. For example, the ls command shows the names of all the contents available in the current directory. If we use an option with it, the option modifies the output. For example, if we use the -l option, it displays the names in the listing format with other properties. No option can force the ls command to display contents from another directory. An argument does this job. If we specify a directory with this command as an argument, it shows the contents of that directory instead of the current directory.
$ls $ls data $ls -l data

The first command displays the contents of the current directory. This command does not use any option or argument.
The second command uses one argument. We specified the data directory's name as an argument. If we specify the target directory, the ls command displays the content of the specified directory.
The third command uses one argument and one option. The option instructs the command to display the output in the list format with detailed information. The argument instructs the command to display the content of the specified directory instead of the current directory.
Conclusion
Options and arguments allow us to control the command's output. Options format the output. Arguments control the command. They instruct the command to include additional information in the output.
Author Laxmi Goswami Updated on 2026-03-14