The Command PATH:
Most common commands are located in your shell’s “PATH” meaning that you can just type the name of the program to execute it.
Example: Typing “ls” will execute the “ ls” command.
Your shell’s “PATH” variable includes the most common program locations, such as /bin, /usr/bin, /usr/X11R6/bin, and others.
To execute commands that are NOT in your current PATH, you have to give the complete location of the command.
./yourprogram (This will execute the program in the current directory)
Commands can be run by themselves or you can pass in additional arguments to make them do different things. Typical command syntax can look something like this:
command [argument] [-argument] [--argument] [file]
- ls – List files in current directory
- ls -l Lists files in “long” format
- ls -l –color As above, with colorized output
- cat filename Show contents of a file
- cat -n filename Show contents of a file, with line numbers