FREE CHEAT SHEET

Linux commands worth knowing

A fast reference for Linux administration and troubleshooting practice.

TaskCommandPurpose
System infouname -aKernel and system information
Disk freedf -hFilesystem capacity
Directory usagedu -sh *Find space consumers
Memoryfree -mRAM and swap usage
Processesps auxProcess listing
Live processestopCPU/memory activity
Service statesystemctl status NAMEInspect a systemd unit
Journaljournalctl -u NAMEReview service logs
Interfacesip addrAddresses and link state
Routesip routeRouting table
Socketsss -tulnListening TCP/UDP sockets
PermissionschmodChange permission bits
OwnershipchownChange owner/group
Search textgrepMatch patterns
Find filesfindSearch paths by criteria
Follow logtail -f FILEWatch appended log lines
Block deviceslsblkInspect disks and partitions
MountsmountShow mounted filesystems
SELinux modegetenforceCheck enforcement state
Connectivityping HOSTTest ICMP reachability when allowed