This is a draft cheat sheet. It is a work in progress and is not finished yet.
Directory Operations
pwd |
Print Working Directory |
cd dir |
Change Directory to dir |
mkdir name |
Make Directory in current Directory |
mkdir -p |
Make new nested directories |
rmdir |
Remove directory |
rm -rf |
Remove directory and content (forced) |
cp -R |
Copies one directory and its files to another directory |
tree |
Shows the subdirectories |
Accessing Consoles
tty |
terminal that you connect to |
who |
who is currently logged |
Listing Files
ls |
List files and directories |
ls -a |
List files and directories including hidden |
ls -aF |
List files and directories including hidden and file types |
ls /etc |
List files and directories of the server's configuration directory |
ls -l |
List files and directories showing more details |
ls -lrt |
List files and directories with the last modified at the end |
ls -lh |
List files and directories in a more readable format |
ls -ld |
Lists the file directory file type |
ls -lR |
Lists files and directories Recursevly |
ls -1 |
Lists files and directories 1 per line |
ls -m |
Lists files and directories comma separated |
File Types
lsblk |
Lists the block devices on the system |
|
|
Working with Files
cp |
copy commands |
cat |
reads the contents |
cp -i |
copy with interactive mode command |
mv |
move or rename command |
rm |
remove command |
|
|
|