Useful commands

Command Description Useful flags Notes
ls list files -l long format, -a all files (including dotfiles)
pwd print working directory
cd change working directory Passing no destination, will land you in $HOME
rm remove file/directory -f to force the action (ignore permissions), -r to remove recursively (all subdirectories)
cp copy file/directory -R to copy recursively
mv move file/directory
touch create file
mkdir make directory -p create parent dirs
cat print file
head print the first 5 lines of a file -n 10 to print the first 10 lines (and so on)
tail print the last 5 lines of a file -n 10 to print the last 10 lines (and so on)
watch run command every 2 seconds -n 4 to run the command every 4 sec