Basic Linux Terminal Commands
Cheat Sheet
[ Shortcuts ]
CTRL L = Clear the terminal
CTRL D = Logout
CTRL A = Cursor to start of the line
CTRL E = Cursor to end of the line
CTRL U = Delete left
CTRL K = Delete right
CTRL W = Delete word on the left
CTRL R = Reverse history
CTRL Z = Stops current command
!! = Repeat last command
SHIFT Page Up/Down = Move terminal scroll up and down
TAB = Auto complete file or command
[ Navigation ]
ls -a = List all files and folders
ls <foldername> = List files inside a folder
ls -lh = Detailed list
ls -l *.png = List only .png files
ls -lh <filename> = Results for file only
cd <foldername> Enter that folder (change directory)
cd / = Root directory
cd .. = Go up one folder
du -h: Disk usage
pwd = Print working directory
man <command> = Show manuals
[ File Management ]
cat <filename> Show contents of file
mkdir <name> = Creates folder
cp = Copy file
mv = Move file
rm <filename> = Delete file
rm -f <name> Force delete
rm -r <foldername> = Delete folder (and contents)
touch <filename> = Create file