Advanced Linux Command List: What Every Experienced User Should Know

Linux Cheat Sheet: Essential Commands for Power Users

This cheat sheet covers file operations, permissions, process management, networking, searching, compression, SSH, and more. Bookmark this for quick reference!


๐Ÿ“ File Operations

CommandDescriptionExample
lsList filesls -la (detailed list)
cdChange directorycd /var/log
cpCopy filescp file.txt /backup/
mvMove/renamemv old.txt new.txt
rmRemove filesrm -rf dir/ (โš ๏ธ Caution!)
touchCreate empty filetouch newfile.txt
mkdirCreate directorymkdir new_folder
catDisplay file contentcat file.txt
lessView file page-by-pageless large.log
tailShow last linestail -f logfile (follow updates)
headShow first lineshead -n 10 file.txt

๐Ÿ” Permissions (chmod, chown)

Understanding rwx (Read, Write, Execute)

SymbolPermissionNumeric Value
rRead4
wWrite2
xExecute1

Common Commands

CommandDescriptionExample
chmodChange permissionschmod 755 script.sh
chownChange ownerchown user:group file.txt
umaskSet default permissionsumask 022

๐Ÿ”„ Process Management

CommandDescriptionExample
psList processesps aux (all processes)
topInteractive process viewertop
htopEnhanced top (install via apt install htop)htop
killTerminate processkill -9 PID (force kill)
pkillKill by namepkill -f "nginx"
bgSend process to backgroundbg %1
fgBring process to foregroundfg %1
jobsList background jobsjobs

๐Ÿง  System Information

CommandDescriptionExample
freeMemory usagefree -h (human-readable)
dfDisk spacedf -h
duDirectory sizedu -sh /var/log/
unameKernel infouname -a
uptimeSystem uptimeuptime
lscpuCPU infolscpu
lsblkList block deviceslsblk

๐ŸŒ Network Utilities

CommandDescriptionExample
pingTest connectivityping google.com
ifconfigNetwork interfaces (deprecated, use ip)ifconfig
ipModern network configip a (show IPs)
netstatNetwork statsnetstat -tulnp (list open ports)
ssSocket statisticsss -tulnp
wgetDownload fileswget https://example.com/file.zip
curlHTTP requestscurl -O https://example.com/file.zip
digDNS lookupdig google.com
whoisDomain infowhois example.com
tracerouteNetwork path tracingtraceroute google.com

๐Ÿ” Searching & Text Processing

CommandDescriptionExample
grepSearch textgrep "error" logfile
findSearch filesfind / -name "*.log"
locateFast file search (requires updatedb)locate nginx.conf
awkText processingawk '{print $1}' file.txt
sedStream editorsed 's/old/new/g' file.txt

๐Ÿ“ฆ Compression & Archiving

CommandDescriptionExample
tarArchive filestar -czvf archive.tar.gz /folder/
gzipCompress filesgzip file.txt
gunzipDecompress filesgunzip file.txt.gz
zipCreate ZIP archivezip archive.zip file1 file2
unzipExtract ZIPunzip archive.zip

๐Ÿš€ SSH Tips & Shortcuts

CommandDescriptionExample
sshConnect to remote serverssh user@host
scpSecure copyscp file.txt user@host:/path/
rsyncSync filesrsync -avz /local/ user@host:/remote/
ssh-keygenGenerate SSH keysssh-keygen -t ed25519
~/.ssh/configSSH shortcutsAdd: Host myserver

HostName 1.2.3.4
User root |


โšก Common Shortcuts

ShortcutDescription
Ctrl+CKill process
Ctrl+ZSuspend process
Ctrl+DExit shell
Ctrl+RReverse search history
!!Repeat last command
!$Last argument of previous command

โœ… Conclusion

This cheat sheet covers 90% of daily Linux tasks. Keep it handy and master the terminal!

Want more?

  • Learn Bash scripting (for, if, while loops).

  • Explore systemd (systemctl start/stop/restart).

  • Dive into log analysis (journalctl, grep).

Happy Learningโ€ฆ

0
Subscribe to my newsletter

Read articles from Bhashkar Kushwaha directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Bhashkar Kushwaha
Bhashkar Kushwaha