๐ŸŽฏ New! Master certifications with Performance-Based Questions (PBQ) โ€” realistic hands-on practice for CompTIA & Cisco exams!

๐Ÿง

Linux Commands Cheat Sheet

Essential Linux command line reference for IT professionals

Showing 35 commands
Command Category Syntax Description Common Flags
lsFilesls [options] [path]List directory contents-l (long), -a (all), -h (human)
cdNavigationcd [path]Change directory
pwdNavigationpwdPrint working directory
mkdirFilesmkdir [options] dirCreate directory-p (parents)
rmFilesrm [options] fileRemove files/dirs-r (recursive), -f (force)
cpFilescp [options] src destCopy files/dirs-r (recursive), -p (preserve)
mvFilesmv src destMove or rename
catTextcat fileDisplay file contents-n (line numbers)
grepTextgrep pattern fileSearch text patterns-r (recursive), -i (ignore case)
findSearchfind path -name patternFind files-type f/d, -mtime, -size
chmodPermissionschmod mode fileChange permissions-R (recursive)
chownPermissionschown user:group fileChange ownership-R (recursive)
psProcessps [options]List processesa (all), u (user), x (no tty)
topProcesstopReal-time process monitor-d (delay)
killProcesskill [signal] PIDSend signal to process-9 (SIGKILL), -15 (SIGTERM)
systemctlServicessystemctl action serviceManage systemd servicesstart, stop, enable, status
journalctlLogsjournalctl [options]View systemd logs-f (follow), -u (unit)
tailTexttail [options] fileShow last lines-f (follow), -n (lines)
headTexthead [options] fileShow first lines-n (lines)
sshNetworkssh user@hostSecure shell connection-i (identity), -p (port)
scpNetworkscp src user@host:destSecure copy-r (recursive)
curlNetworkcurl [options] URLTransfer data from URL-X (method), -d (data), -H (header)
wgetNetworkwget URLDownload files-O (output), -r (recursive)
netstatNetworknetstat [options]Network statistics-t (tcp), -u (udp), -l (listen)
ssNetworkss [options]Socket statisticsReplaces netstat
ipNetworkip [object] [command]IP configurationaddr, route, link
pingNetworkping hostTest connectivity-c (count)
tracerouteNetworktraceroute hostTrace packet route
dfDiskdf [options]Disk space usage-h (human readable)
duDiskdu [options] pathDirectory size-s (summary), -h (human)
tarArchivetar [options] archive filesArchive files-c (create), -x (extract), -z (gzip)
aptPackageapt [command] [package]Package manager (Debian)install, remove, update
yum/dnfPackageyum [command] [package]Package manager (RHEL)install, remove, update
nanoEditornano fileSimple text editor
vimEditorvim fileAdvanced text editor:wq (save), :q! (quit)