Show Menu
Cheatography

Linux Cache Commands Cheat Sheet (DRAFT) by

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

System

 

Users & Groups

 

Compre­ssion

 

Remote Management

 

Opreatons

 

Shortcuts

 

Process

 

Files & Direct­ories

pwd
Show current directory
cd <d­­ir>
cd ..
cd ~
Change directory
Go up one directory
Go to home dir
ls
ls -a
ls -t
ls -S
ll
ls *.txt
List files
show all (inculding hidden)
sort by last modified
sort by size
alias 'ls -alF'
list all .txt files
mkdir <di­r>
touch <fi­le>
Make directory <di­r>
Make a file
rmdir <di­r>
rm -rf [pattern]
rm <fi­le>
rm -R <di­r>
remove a directory
remove directory and all subdir­­ec­t­ories
remove <fi­le>
remove <di­r>
mv [sour­ces] [dest­­ina­­tion]
rename / move files or directory
cp [sour­­­ces] [dest­­­in­a­­­tion]
cp <fi­le1> <fi­le2>
copy files or directory
copy <f­­ile­­1> to <f­­ile­­2>
cat <f­­ile­­>
print the contents of <f­­ile­­>
less <f­­ile­­>
view and paginate <f­­ile­­>
head <f­­ile­­>
head -c 5 <fi­le>
head -n 5 <fi­le>
show the first 10 lines of <fi­le>
show the first 5 bytes
show the first 5 lines
tail <f­­ile­­>
tail -c 5 <fi­le>
tail -n 5
show the last 10 lines of <fi­le>
show the last 5 bytes
show the last 5 lines
nano <f­­ile­­>
edit the contents of <f­­ile­­>
vi <f­­ile­­>
edit the contents of <f­­ile­­>
vim <f­­ile­­>
edit the contents of <f­­ile­­>
file <fi­le>
to determine the file type

Services

 

Install & Update

 

Curl

 

Help

 

Hardware

 

Search

 

Network

 

Nano

 

For Fun