By Justin MillerFebruary 27th 2021
Here are a few commonly used commands in case you ever forget them.
Navigating the Shell
- pwd
- "Prints" or shows the current directory you are in.
- ls [path]
- Perform a listing of the path you are currently in.
- Common options: -l, -h, -a
- cd [path]
- Change into the given path or into your home directory.
- Path
- A description of where a file or directory is on the filesystem.
- Absolute Path
- One beginning from the root of the file system (eg. /etc/sysconfig ).
- Relative Path
- One relative to where you currently are in the system (eg. Documents/music ).
- ~ (tilde)
- Used in paths as a reference to your home directory (eg. ~/Documents ).
- . (dot)
- Used in paths as a reference to your current directory (eg. ./bin ).
- .. (dot dot)
- Used in paths as a reference to your current directories parent directory (eg. ../bin ).
- TAB completion
- Start typing and press TAB. The system will auto complete the path. Press TAB twice and it will show you your alternatives.
Permissions
- r (read) w (write) x (execute)
- Owner or User, Group and Others
- ls -l [path]
- View the permissions of a file or all items in a directory.
- chmod <permissions> <path>
- Change permissions.
Instructional Commands
- man <command>
- View the man page for a command.
- man -k <search term>
- Search for man pages containing the search term.
- Press q to exit man pages