If you're looking to level up your Linux command line skills, here’s a curated list of advanced Linux commands, tools, and techniques, categorized by functionality:
🔍 File and Text Processing
-
awkawk '{print $2, $1}' file.txt-
Powerful for pattern scanning and processing.
-
-
sedsed -E 's/([0-9]{3})/\1-/' file.txt-
Stream editor for modifying files or inputs inline.
-
-
xargsfind . -name '*.log' | xargs grep 'ERROR'-
Converts input from stdin into arguments to a command.
-
-
cut,paste,tr,sort,uniq,teecut -d':' -f1 /etc/passwd | sort | uniq
🧠 System Monitoring and Performance
-
htop/atop/glances-
Interactive process viewers.
-
-
iotop-
Shows disk I/O by process.
-
-
stracestrace -p <PID>-
Traces system calls of a process.
-
-
lsoflsof -i :80-
Lists open files and ports.
-
-
watchwatch -n 2 df -h-
Repeats a command at intervals.
-
📁 Disk & Filesystem Tools
-
ncdu-
Visual disk usage analysis.
-
-
df,dudu -sh * | sort -h -
mount,umount,lsblk,blkid
🧰 Networking & Sockets
-
netstat/ssss -tuln -
nmapnmap -sV 192.168.1.1 -
tcpdumptcpdump -i eth0 port 80 -
curl,wget,nc(netcat)curl -I https://example.com nc -vz google.com 80
🔐 Permissions, Security, & Users
-
chmod,chown,setfacl,getfacl -
sudo,visudo -
usermod,groupadd,passwd -
ssh,scp,rsyncrsync -avz /local/dir/ user@host:/remote/dir/
🔄 Automation and Scripting
-
cron,atcrontab -e -
Shell scripting:
for i in *.log; do gzip "$i"; done -
trap,set -euo pipefailfor robust scripts.
📦 Package Management
-
Debian/Ubuntu:
apt,dpkg -
Red Hat/CentOS:
yum,dnf,rpm -
Arch:
pacman
🧠 Cool Pro Tips
-
Brace expansion:
mkdir -p project/{src,bin,doc} -
Process substitution:
diff <(ls dir1) <(ls dir2) -
Command chaining:
cmd1 && cmd2 || echo "cmd1 failed" -
Parallel execution with
&andwait:cmd1 & cmd2 & wait
If you want a focused guide (e.g. for networking, performance tuning, or scripting), just let me know!

No comments:
Post a Comment