Show Menu
Cheatography

Linux - SE370 Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.
 

Basic Navigation

pwd
Where am I in the system.
ls [path]
Perform a listing of the given path or your current directory. Common options: -l, -h, -a
cd [path]
Change into the given path or into your home directory.
Path
A descri­ption of where a file or directory is on the filesy­stem.
Absolute Path
One beginning from the root of the file system (eg. /etc/s­ysc­onfig ).
Relative Path
One relative to where you currently are in the system (eg. Docume­nts­/music ).
~ (tilde)
Used in paths as a reference to your home directory (eg. ~/Docu­ments ).
. (dot)
Used in paths as a reference to your current directory (eg. ./bin ).
.. (dot dot)
Used in paths as a reference to your current direct­ories 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 altern­atives.

Manual Pages

man <co­mma­nd>
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

More About Files

file [path]
Find out what type of item a file or directory is.
Spaces in names
Put whole path in quotes ( " ) or a backslash ( \ ) in front of spaces.
Hidden files and direct­ories
A name beginning with a . (dot) is considered hidden.

Permis­sions

r (read) w (write) x (execute)
Owner or User, Group and Others
ls -l [path]
View the permis­sions of a file or all items in a directory.
chmod <pe­rmi­ssi­ons> <pa­th>
Change permis­sions. Permis­sions can be either shorthand (eg. 754) or longhand (eg. g+x).