Linux Commands Reference Guide

Search, filter by categories, and quickly copy Linux commands.


No commands found
Try a different keyword or switch tabs.

📁 File & Directory Management

0 shown
Command Description Example
catConcatenate and display filescat file.txt
cdChange directorycd /var/www
cpCopy files and directoriescp -r source/ dest/
dfDisplay disk space usagedf -h
duDisk usage of files/directoriesdu -sh *
fileDetermine file typefile unknown.dat
findSearch for files and directoriesfind / -name *.conf
headDisplay first lines of filehead -n 20 file.txt
lessView file content page by pageless /var/log/syslog
locateFind files by name quicklylocate passwd
lsList directory contentsls -lah
mkdirMake directoriesmkdir -p /path/to/dir
moreDisplay file one screen at a timemore file.txt
mvMove/rename filesmv old new
pwdPrint working directorypwd
rmRemove files or directoriesrm -rf directory/
rmdirRemove empty directoriesrmdir dirname
tailDisplay the last lines of filetail -f /var/log/auth.log

📝 Text Processing

0 shown
Command Description Example
fgrepFast grep for fixed stringsfgrep 'string' file.txt
grepSearch text patterns in filesgrep -r 'error' /var/log/
joinJoin lines of two filesjoin file1 file2
sedStream editor for text manipulationsed 's/old/new/g' file.txt
sortSort lines of text filessort -n numbers.txt
splitSplit the file into piecessplit -l 1000 bigfile.txt
trTranslate or delete characterstr '[:lower:]' '[:upper:]'
uniqReport or omit repeated linesuniq -c sorted.txt
wcCount words, lines and characterswc -l file.txt

🖥️ System Information & Monitoring

0 shown
Command Description Example
calDisplay calendarcal 2024
dateDisplay/set system date/timedate '+%Y-%m-%d %H:%M:%S'
dmesgPrint kernel ring buffer messagesdmesg | tail
freeDisplay memory usagefree -h
hostnameShow/set system hostnamehostname
htopInteractive process viewerhtop
idPrint user and group IDsid username
iostatReport CPU and I/O statisticsiostat -x 5

⚙️ Process Management

0 shown
Command Description Example
bgPut jobs in backgroundbg %1
fgBring jobs to foregroundfg %1
jobsList active jobsjobs
killSend a signal to a processkill -9 1234
killallKill processes by namekillall firefox
niceRun with modified prioritynice -n 10 command
nohupRun immune to hangupsnohup script.sh &
pgrepLook up processes by namepgrep nginx
pkillSignal processes by namepkill -u username
reniceAlter priority of running processrenice -5 -p 1234
screenScreen manager with terminalsscreen -S session1
tmuxTerminal multiplexertmux new -s mysession

🌐 Network Commands

0 shown
Command Description Example
arpManipulate ARP cachearp -a
curlTransfer data from/to servercurl -O https://file.zip
digDNS lookup utilitydig google.com ANY
ftpFile transfer protocol clientftp ftp.example.com
hostDNS lookup utilityhost google.com
ifconfigConfigure network interfaceifconfig eth0
ipShow/manipulate routing, devicesip addr show
iptablesIPv4 packet filtering adminiptables -L
ncNetcat – networking utilitync -zv host 1-1000
netstatNetwork statisticsnetstat -tulpn
nslookupQuery DNS serversnslookup google.com
pingSend ICMP ECHO_REQUESTping -c 4 google.com
routeShow/manipulate IP routingroute -n
rsyncRemote file syncrsync -avz src/ dst/
scpSecure copy over SSHscp file user@host:/path/
ssSocket statisticsss -tulwn
sshSecure shell clientssh user@192.168.1.1

📦 Compression & Archiving

0 shown
Command Description Example
7z7-Zip archiver7z a archive.7z folder/
bunzip2Decompress bzip2 filesbunzip2 file.txt.bz2
bzip2Block-sorting file compressorbzip2 file.txt
gunzipDecompress gzip filesgunzip file.txt.gz
gzipCompress filesgzip file.txt
rarCreate RAR archivesrar a archive.rar file
tarArchive utilitytar -czvf archive.tar.gz dir/
unrarExtract RAR archivesunrar x archive.rar
unzipExtract compressed filesunzip archive.zip
zipPackage and compress fileszip -r archive.zip folder/

👤 User & Group Management

0 shown
Command Description Example
groupaddCreate a new groupgroupadd developers
groupdelDelete groupgroupdel groupname
groupsShow user's groupsgroups username
passwdChange user passwordpasswd username
suSwitch usersu - username
sudoExecute as superusersudo command
useraddCreate a new useruseradd -m username
userdelDelete user accountuserdel -r username
usermodModify user accountusermod -aG sudo username
visudoEdit the sudoers filevisudo

💾 Disk & Filesystem Management

0 shown
Command Description Example
blkidLocate/print block device attributesblkid
ddConvert and copy filedd if=/dev/sda of=backup.img
fdiskPartition table manipulatorfdisk -l
fsckCheck and repair filesystemfsck /dev/sda1
lsofList open fileslsof -i :80
mkfsBuild a Linux filesystemmkfs.ext4 /dev/sdb1
mountMount filesystemmount /dev/sdb1 /mnt
partedPartition manipulation programparted /dev/sda print
syncSynchronise cached writessync
umountUnmount filesystemumount /mnt

⏱️ System Control & Scheduling

0 shown
Command Description Example
atSchedule one-time tasksat 10:00 AM
crontabSchedule periodic taskscrontab -e
dmesgPrint kernel messagesdmesg | grep error
haltHalt the systemhalt
journalctlQuery systemd journaljournalctl -u nginx
loggerMake entries in system loglogger 'Test message'
poweroffPower off the systempoweroff
rebootReboot the systemreboot
serviceRun System V init scriptservice apache2 restart
shutdownShutdown or restart systemshutdown -h now
systemctlControl systemd servicessystemctl status nginx

🔐 Security & Penetration Testing

0 shown
Command Description Example
aircrack-ngWiFi security auditingaircrack-ng -w wlist capture.cap
gpgEncryption and signing toolgpg -c file.txt
hashcatAdvanced password recoveryhashcat -m 0 hash.txt wlist.txt
⚠️ Security Reminders