Essential Linux Commands Every Sysadmin Should Know
A comprehensive reference of essential Linux commands covering file management, system monitoring, user administration, networking, compression, and process control, providing concise descriptions to help users navigate and operate Linux systems efficiently.
Command Help and Manual Lookup
man : View command help pages and manuals.
help : Show help for built‑in shell commands such as cd.
File and Directory Operations (18 commands)
ls : List directory contents with attributes.
cd : Change the current working directory.
cp : Copy files or directories.
find : Search for files or directories.
mkdir : Create a new directory.
mv : Move or rename files.
pwd : Print the absolute path of the current directory.
rename : Rename a file.
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 filename component of a path.
dirname : Show the directory component of a path.
chattr : Change file extended attributes.
lsattr : List file extended attributes.
file : Determine file type.
md5sum : Compute and verify MD5 checksums.
File Content Viewing and Processing (21 commands)
cat : Concatenate files and output to screen or redirect.
tac : Reverse the order of cat output.
more : Paginate file output.
less : Paginate file output with backward navigation.
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 of files side by side.
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 diff using Vim.
rev : Reverse each line of a file.
grep / egrep : Filter lines matching patterns.
join : Join two files on a common field.
tr : Translate or delete characters.
sed : Stream editor for text transformations (not listed but commonly used).
Compression and Archiving (4 commands)
tar : Archive files; optionally compress.
unzip : Extract ZIP archives.
gzip : Compress files using gzip.
zip : Create ZIP archives.
System Information Commands (11 commands)
uname : Show kernel and OS information.
hostname : Display or set the system hostname.
dmesg : Print kernel ring buffer messages (boot info).
uptime : Show system uptime and load average.
date : Display or set the system date and time.
cal : Show a calendar.
whoami : Print the effective username.
who : List users currently logged in.
w : Show who is logged in and what they are doing.
last : Display a list of recent logins.
lastlog : Show the most recent login of each user.
File Search Commands (4 commands)
which : Locate a binary in the PATH.
find : Search the filesystem hierarchy for files.
whereis : Locate binary, source, and manual page files.
locate : Find files using a prebuilt database.
User Management (10 commands)
useradd : Add a new user.
usermod : Modify an existing user.
userdel : Delete a user.
groupadd : Create a new group.
passwd : Change a user's password.
chage : Change password expiration info.
id : Show user and group IDs.
su : Switch to another user account.
visudo : Safely edit the sudoers file.
sudo : Execute a command with elevated privileges.
Network Operations (11 commands)
telnet : Remote login using the TELNET protocol.
ssh : Secure remote login via SSH.
scp : Securely copy files between hosts.
wget : Download files from the web.
ping : Test network connectivity.
route : Show or modify the IP routing table.
ifconfig : Configure network interfaces.
ifup : Bring a network interface up.
ifdown : Bring a network interface down.
netstat : Display network connections and routing tables.
ss : Show socket statistics (modern replacement for netstat).
Advanced Network Tools (9 commands)
nmap : Network scanner.
lsof : List open files and the processes using them.
mail : Send and receive email from the command line.
mutt : Text‑based email client.
nslookup : Query DNS servers interactively.
dig : Perform DNS lookups.
host : Simple DNS query tool.
traceroute : Trace the path packets take to a destination.
tcpdump : Capture and analyze network traffic.
Disk and Filesystem Commands (16 commands)
mount : Mount a filesystem.
umount : Unmount a filesystem.
fsck : Check and repair a filesystem.
dd : Convert and copy files at a low level.
dumpe2fs : Dump ext2/3/4 filesystem information.
dump : Backup ext2/3/4 filesystems.
fdisk : Partition disks up to 2 TB.
parted : Partition disks of any size.
mkfs : Create a filesystem on a device.
partprobe : Inform the kernel of partition table changes.
e2fsck : Check ext2/3/4 filesystems.
mkswap : Set up a swap area.
swapon : Enable swap.
swapoff : Disable swap.
sync : Flush filesystem buffers to disk.
resize2fs : Resize ext2/3/4 filesystems.
System Permissions and Ownership (4 commands)
chmod : Change file or directory permissions.
chown : Change file owner and group.
chgrp : Change group ownership.
umask : Set default permission mask.
Process Management (15 commands)
bg : Resume a stopped job in the background.
fg : Bring a background job to the foreground.
jobs : List current jobs.
kill : Send a signal to terminate a process.
killall : Kill processes by name.
pkill : Kill processes matching a pattern.
crontab : Schedule recurring 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 : Find processes matching criteria.
runlevel : Show the current runlevel.
init : Change the system runlevel.
service : Start, stop, or query system services.
System Monitoring and Performance (9 commands)
top : Real‑time view of system resource usage.
free : Show memory usage.
vmstat : Virtual memory statistics.
mpstat : CPU usage per processor.
iostat : I/O statistics.
sar : Collect and report system activity.
ipcs : Report inter‑process communication facilities.
ipcrm : Remove IPC objects.
strace : Trace system calls and signals.
Shutdown, Reboot, and Session Control (6 commands)
shutdown : Power off or reboot the system.
halt : Halt the system.
poweroff : Turn off power.
logout : Exit the current shell session.
exit : Exit the current shell.
Ctrl+D : Shortcut to exit the shell.
Shell Utilities
echo : Print text or variable values.
printf : Formatted output.
rpm : Manage RPM packages.
yum : Simplify RPM package management.
watch : Repeatedly execute a command and display output.
alias / unalias : Define or remove command aliases.
date : Show or set system date and time.
clear : Clear the terminal screen.
history : Show command history.
eject : Eject removable media.
time : Measure execution time of a command.
nc : Netcat, a versatile networking tool.
xargs : Build and execute command lines from standard input.
exec : Replace the shell with a specified command.
type : Determine if a command is built‑in.
bc : Command‑line calculator.
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.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
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.
