Learn navigation commands, understand the Linux directory structure, create and delete files, and use tab completion and command history.
Every server, container, and CI environment is Linux. The terminal is the universal interface. GUI tools come and go. The terminal is everywhere.
pwd # print working directory
ls # list directory contents
ls -la # long format, show hidden files
cd /home # change to absolute path
cd ~ # home directory
cd .. # parent directory
cd - # previous directory
# Autocomplete: press Tab
# History: press ↑ arrow
# Search history: Ctrl+R then type/ ← root of the filesystem
/home ← user home directories (/home/bo)
/etc ← configuration files
/var/log ← log files
/tmp ← temporary files (cleared on reboot)
/usr/bin ← user programs
/usr/local ← locally installed software
/proc ← virtual FS: running process info
/dev ← device filesmkdir mydir # create directory
mkdir -p a/b/c # create nested dirs
touch file.txt # create empty file
rm file.txt # delete file
rm -rf mydir/ # delete directory (careful!)
mv file.txt newname.txt # rename/move
cp file.txt backup.txt # copy
cp -r dir/ backup/ # copy directoryrm -rf / deletes your entire system with no confirmation and no recovery. rm -rf ./ (with the dot) does the same for your current directory. Always double-check paths before running rm -rf.pwd, ls -la, cd — the three commands you use a hundred times a day.rm -rf has no undo. Always double-check the path before running it./etc = config, /var/log = logs, /home = user data.