Operations 16 min read

Master Essential Linux Commands: A Complete Cheat‑Sheet for System Operations

This article provides a comprehensive list of common Linux command-line utilities, grouped by functionality such as file manipulation, system monitoring, user management, networking, and more, with brief descriptions of each command’s purpose.

Python Programming Learning Circle
Python Programming Learning Circle
Python Programming Learning Circle
Master Essential Linux Commands: A Complete Cheat‑Sheet for System Operations

Online query and help commands (2)

man : View command help and dictionary; more complex information via info (rarely used).

help : Show built‑in Linux command help, e.g., cd.

File and directory operation commands (18)

ls : List directory contents and attribute information.

cd : Change the current working directory to a specified directory.

cp : Copy files or directories.

find : Search for directories and files.

mkdir : Create directories.

mv : Move or rename files.

pwd : Print the absolute path of the current working directory.

rename : Rename files.

rm : Remove one or more files or directories.

rmdir : Remove empty directories.

touch : Create a new empty file or change the timestamp of an existing file.

tree : Display directory contents in a tree‑like structure.

basename : Show the file name or directory name.

dirname : Show the path of a file or directory.

chattr : Change a file’s extended attributes.

lsattr : View a file’s extended attributes.

file : Display the type of a file.

md5sum : Compute and verify a file’s MD5 checksum.

File viewing and content processing commands (21)

cat : Concatenate files and print to standard output or redirect to a file.

tac : Reverse the order of cat, displaying file contents backwards.

more : Paginate file output.

less : Paginate file output (inverse of more).

head : Show the beginning of a file.

tail : Show the end of a file.

cut : Split each line of a file by a specified delimiter and output the fields.

split : Divide a file into smaller pieces.

paste : Merge lines of files side by side.

sort : Sort the textual content of a file.

uniq : Remove duplicate lines.

wc : Count lines, words, or bytes in a file.

iconv : Convert a file’s character encoding.

dos2unix : Convert DOS‑format files to UNIX format.

diff : Compare differences between files (commonly text files).

vimdiff : Visual file comparison tool in the terminal.

rev : Output file contents in reverse order.

grep/egrep : Filter strings (the third sword of the “three‑sword” trio).

join : Merge two files on common fields.

tr : Replace or delete characters.

vi/vim : Command‑line text editor.

File compression and extraction commands (4)

tar : Archive and compress files.

unzip : Decompress files.

gzip : Gzip compression tool.

zip : Zip compression tool.

Information display commands (11)

uname : Show operating‑system related information.

hostname : Show or set the system’s host name.

dmesg : Display boot messages for diagnosing system faults.

uptime : Show system uptime and load.

stat : Show status of a file or filesystem.

du : Estimate disk space usage.

df : Report filesystem disk space usage.

top : Real‑time display of system resource usage.

free : Show system memory usage.

date : Display or set system time.

cal : View calendar and related time information.

File search commands (4)

which : Locate binary commands by searching the PATH environment.

find : Traverse the disk to locate files or directories.

whereis : Locate binary commands by searching the PATH environment.

locate : Search a database ( /var/lib/mlocate/mlocate.db) for files; update with updatedb.

User management commands (10)

useradd : Add a user.

usermod : Modify existing user attributes.

userdel : Delete a user.

groupadd : Add a user group.

passwd : Change a user’s password.

chage : Modify password expiration.

id : Show a user’s UID, GID, and group memberships.

su : Switch user identity.

visudo : Edit the /etc/sudoers file safely.

sudo : Execute commands as another user (default root) as permitted in sudoers.

Basic network operation commands (11)

telnet : Remote login using the TELNET protocol.

ssh : Remote login using the encrypted SSH protocol.

scp : Secure copy files between hosts.

wget : Download files from the command line.

ping : Test network connectivity between hosts.

route : Show or set the Linux routing table.

ifconfig : View, configure, enable, or disable network interfaces.

ifup : Bring a network interface up.

ifdown : Bring a network interface down.

netstat : Show network status.

ss : Show network status.

Advanced network operation commands (9)

nmap : Network scanning tool.

lsof : List open files in the system.

mail : Send and receive email.

mutt : Email management command.

nslookup : Interactive DNS query tool.

dig : Query DNS resolution process.

host : DNS query command.

traceroute : Trace the route packets take to a destination.

tcpdump : Command‑line packet capture tool.

Disk and filesystem commands (16)

mount : Mount a filesystem.

umount : Unmount a filesystem.

fsck : Check and repair Linux filesystems.

dd : Convert or copy files.

dumpe2fs : Export ext2/ext3/ext4 filesystem information.

dump : Backup tool for ext2/3/4 filesystems.

fdisk : Disk partitioning (for disks < 2 TB).

parted : Disk partitioning without size limit (commonly for <2 TB).

mkfs : Format and create a Linux filesystem.

partprobe : Update kernel partition table information.

e2fsck : Check ext2/ext3/ext4 filesystems.

mkswap : Create a Linux swap partition.

swapon : Enable a swap partition.

swapoff : Disable a swap partition.

sync : Flush buffered data to disk.

resize2fs : Resize ext2/ext3/ext4 filesystems.

System permission and user authorization commands (4)

chmod : Change file or directory permissions.

chown : Change file or directory owner and group.

chgrp : Change a file’s group.

umask : Show or set the permission mask.

System user login information commands (7)

whoami : Show the effective user name (same as id -un).

who : Show currently logged‑in users.

w : Show logged‑in users and their running commands.

last : Display recent logins.

lastlog : Show the most recent login for all users.

users : List all users currently logged in.

finger : Look up and display user information.

System management and performance monitoring commands (9)

chkconfig : Manage Linux startup services.

vmstat : Virtual memory statistics.

mpstat : Show per‑CPU statistics.

iostat : Report system I/O statistics.

sar : Collect comprehensive performance data (CPU, queues, I/O, memory, interrupts, network, etc.).

ipcs : Report status of inter‑process communication facilities.

ipcrm : Remove message queues, semaphore sets, or shared memory identifiers.

strace : Trace system calls, signals, and process state changes.

ltrace : Trace library function calls of a process.

Shutdown / reboot / logout and system info commands (6)

shutdown : Shut down the system.

halt : Halt the system.

poweroff : Power off the system.

logout : Exit the current shell session.

exit : Exit the current shell session.

Ctrl+d : Shortcut to exit the current shell.

Process management commands (15)

bg : Resume a paused background job.

fg : Bring a background job to the foreground.

jobs : List current background jobs.

kill : Terminate a process.

killall : Terminate processes by name.

pkill : Terminate processes by name.

crontab : Schedule recurring tasks.

ps : Show a snapshot of processes.

pstree : Display processes in a tree format.

nice/renice : Adjust process priority.

nohup : Run a command immune to hang‑up signals.

pgrep : Find processes matching criteria.

runlevel : Show the current system runlevel.

init : Change the system runlevel.

service : Start, stop, restart, or query the status of system services.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxShellcommand-lineUnixSystem Administration
Python Programming Learning Circle
Written by

Python Programming Learning Circle

A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.