12.1. Command Line Basics¶
12.1.1. What’s A CLI?¶
A Command Line Interface or CLI is a simple text only interface. A user provides a command with or without some additional information and then the command is exectued.
Basics:
1. When you execute a command you must type the name of the command, in addition the command must be located in your PATH
What’s a PATH? A PATH is a list of directories, in these directories executables will be located. Common directories are /bin/, /usr/bin/
2. When you execute a command, you often will need to provide additional information. These are called arguments.
Common Arguments
Meanings
-h
displays help information
-v
increases information output, v is for verbosity, or in some cases displays version information
3. If you can not get enough information from the -h argument you can make use of the man command. The man command brings up the man page for information and is a more in depth explanation of the command. Below is an example of running
man ls
4. Further Reading: This was a very brief introduction to the terminal. It was included only to give some context to further chapters that make use of arguments. For more information feel free to check this resource.
*Note: The man command should be available in any GNU-style terminal. If you are using Windows the native Command Prompt does not have a man command.