Linux Cheat Sheet
Essential Linux commands for daily use. File management, networking, and system admin. Bookmark this page or print it.
File Operations
ls -laList filescp -r src dstCopy dirmv src dstMove/renamerm -rf dirRemove dirmkdir -p dirCreate dirsfind . -name "*.txt"Find fileschmod 755 filePermissionschown user:group fileOwnershipText Processing
grep "pattern" fileSearch textgrep -r "pattern" dirRecursive searchsed "s/old/new/g" fileFind & replaceawk "{print $1}" fileColumn extractwc -l fileCount lineshead -n 20 fileFirst 20 linestail -f fileFollow changessort | uniq -cSort & countSystem
top / htopProcess monitorps auxList processeskill -9 PIDKill processdf -hDisk usagedu -sh dirDir sizefree -hMemory usageuname -aSystem infouptimeSystem uptimeNetworking
curl -O urlDownloadwget urlDownloadssh user@hostRemote loginscp file user@host:pathCopy remotenetstat -tulpnOpen portsping hostTest connectivitydig domainDNS lookupifconfig / ip addrNetwork info