Linux is everywhere — servers, containers, cloud. The command line is your most powerful tool.
Navigation¶
pwd, ls -la, cd, mkdir -p, rmdir, tree
Files¶
cp, mv, rm, cat, less, head, tail, find, locate, wc
Text Processing¶
grep -r “pattern” .
sed ‘s/old/new/g’ file
awk ‘{print $1, $3}’ file
sort | uniq -c | sort -rn
cut -d, -f1,3 data.csv
Processes¶
ps aux, top/htop, kill, pkill, nohup, &, jobs, fg, bg
Permissions¶
chmod 755 file
chown user:group file
umask 022
Networking¶
curl, wget, ss, ping, traceroute, dig, nslookup, ip addr
Disk¶
df -h, du -sh, mount, fdisk, lsblk
Archives¶
tar -czf archive.tar.gz dir/
tar -xzf archive.tar.gz
zip -r archive.zip dir/
unzip archive.zip
Systemd¶
systemctl start/stop/restart/status service
journalctl -u service -f
Bash Scripting¶
!/bin/bash¶
set -euo pipefail
for file in *.log; do
echo “Processing $file”
gzip “$file”
done
Tip¶
Learn vim/nano, grep, awk and bash scripting. They’ll cover 80% of your needs.