Essential Linux Command Cheat Sheet for System Administrators
This comprehensive guide lists essential Linux commands—covering help utilities, file and directory operations, content viewing, compression, system information, networking, user management, process control, and system administration—providing concise descriptions to help users quickly understand each command's purpose and usage.
Online Query and Help Commands (2)
man : View command help and dictionary; more complex info via info.
help : Show built‑in Linux command help, e.g., cd.
File and Directory Operations (18)
ls : List directory contents and attributes.
cd : Change the current working directory.
cp : Copy files or directories.
find : Search directories and files.
mkdir : Create directories.
mv : Move or rename files.
pwd : Print the absolute path of the current directory.
rename : Rename files.
rm : Remove one or more files or directories.
rmdir : Remove empty directories.
touch : Create an empty file or update timestamps.
tree : Display directory contents in a tree structure.
basename : Show the file name component.
dirname : Show the directory component of a path.
chattr : Change file extended attributes.
lsattr : List file extended attributes.
file : Identify the file type.
md5sum : Compute and verify a file's MD5 checksum.
File Content Viewing and Processing (21)
cat : Concatenate and display file contents.
tac : Reverse cat output (display file 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 lines by a delimiter and output selected fields.
split : Divide a file into smaller pieces.
paste : Merge lines from multiple files.
sort : Sort text lines.
uniq : Remove duplicate lines.
wc : Count lines, words, or bytes.
iconv : Convert file encoding.
dos2unix : Convert DOS line endings to UNIX.
diff : Show differences between files.
vimdiff : Visual file comparison using Vim.
rev : Reverse the characters in each line.
grep/egrep : Filter lines matching patterns.
join : Join files on a common field.
tr : Translate or delete characters.
vi/vim : Command‑line text editor.
Compression and Decompression (4)
tar : Archive and compress files.
unzip : Extract ZIP archives.
gzip : Compress files using gzip.
zip : Create ZIP archives.
System Information Commands (11)
uname : Display OS information.
hostname : Show or set the system hostname.
dmesg : Show boot messages for diagnostics.
uptime : Show system uptime and load.
stat : Show file or filesystem status.
du : Estimate disk usage of files/directories.
df : Report filesystem disk space usage.
top : Real‑time display of system resource usage.
free : Show memory usage.
date : Display or set system date/time.
cal : Show a calendar.
File Search Commands (4)
which : Locate a binary in $PATH.
find : Search the filesystem for files or directories.
whereis : Locate binaries, sources, and manuals.
locate : Search a prebuilt database for file names.
User Management Commands (10)
useradd : Add a new user.
usermod : Modify an existing user.
userdel : Delete a user.
groupadd : Add a new group.
passwd : Change a user's password.
chage : Change password expiry information.
id : Show a user's UID, GID, and groups.
su : Switch user identity.
visudo : Safely edit the sudoers file.
sudo : Execute a command with elevated privileges.
Basic Network Operations (11)
telnet : Remote login using the TELNET protocol.
ssh : Secure remote login via SSH.
scp : Securely copy files between hosts.
wget : Download files from the command line.
ping : Test network connectivity.
route : View or set the routing table.
ifconfig : View and configure network interfaces.
ifup : Bring a network interface up.
ifdown : Bring a network interface down.
netstat : Display network connections.
ss : Show socket statistics.
Advanced Network Operations (9)
nmap : Network scanning.
lsof : List open files.
mail : Send and receive email.
mutt : Email client.
nslookup : Query DNS servers interactively.
dig : Perform DNS lookups.
host : DNS query utility.
traceroute : Trace the route packets take.
tcpdump : Capture network packets.
Disk and Filesystem Commands (16)
mount : Mount a filesystem.
umount : Unmount a filesystem.
fsck : Check and repair filesystems.
dd : Convert and copy files.
dumpe2fs : Dump ext2/3/4 filesystem info.
dump : Backup ext2/3/4 filesystems.
fdisk : Partition disks (up to 2 TB).
parted : Partition disks without size limit.
mkfs : Create a filesystem.
partprobe : Inform the kernel of partition table changes.
e2fsck : Check ext2/3/4 filesystems.
mkswap : Create a swap area.
swapon : Enable swap.
swapoff : Disable swap.
sync : Flush filesystem buffers.
resize2fs : Resize ext2/3/4 filesystems.
System Permissions and Ownership (4)
chmod : Change file or directory permissions.
chown : Change file owner and group.
chgrp : Change group ownership.
umask : Show or set the default permission mask.
User Login Information Commands (7)
whoami : Show the effective username.
who : List logged‑in users.
w : Show logged‑in users and their activities.
last : Display recent login sessions.
lastlog : Show the most recent login of all users.
users : List all logged‑in users.
finger : Display detailed user information.
Built‑in and Miscellaneous Commands (19)
echo : Print text or variable values.
printf : Format and output data.
rpm : Manage RPM packages.
yum : Automate RPM package management.
watch : Repeatedly run a command and display output.
alias : Define command aliases.
unalias : Remove command aliases.
date : View or set system date/time.
clear : Clear the terminal screen.
history : Show command history.
eject : Eject removable media.
time : Measure command execution time.
nc : Powerful networking utility.
xargs : Build command lines from standard input.
exec : Replace the shell with a command.
export : Set or display environment variables.
unset : Remove variables or functions.
type : Determine if a command is built‑in.
bc : Command‑line calculator.
System Management and Performance Monitoring (9)
chkconfig : Manage system startup services.
vmstat : Report virtual memory statistics.
mpstat : Show CPU statistics.
iostat : Report I/O statistics.
sar : Collect comprehensive performance data.
ipcs : Report inter‑process communication facilities.
ipcrm : Remove IPC objects.
strace : Trace system calls and signals.
ltrace : Trace library calls.
Shutdown, Reboot, Logout and System Info (6)
shutdown : Shut down the system.
halt : Halt the system.
poweroff : Power off the machine.
logout : Exit the current shell.
exit : Exit the current shell.
Ctrl+d : Shortcut to exit the shell.
Process Management Commands (15)
bg : Resume a stopped job in the background.
fg : Bring a background job to the foreground.
jobs : List current background jobs.
kill : Terminate a process.
killall : Kill processes by name.
pkill : Kill processes by name using patterns.
crontab : Manage scheduled tasks.
ps : Snapshot of current processes.
pstree : Display processes as a tree.
nice/renice : Adjust process priority.
nohup : Run a command immune to hangups.
pgrep : Search for processes matching criteria.
runlevel : Show the current runlevel.
init : Change the system runlevel.
service : Start, stop, restart, or query system services.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
