Operations 18 min read

Essential Linux Commands: A Complete Reference Guide

This article provides a comprehensive, alphabetically organized reference of essential Linux commands covering file management, system monitoring, user administration, networking, compression, and process control, each with concise English descriptions to help both beginners and experienced administrators quickly find the right tool.

Linux Cloud Computing Practice
Linux Cloud Computing Practice
Linux Cloud Computing Practice
Essential Linux Commands: A Complete Reference Guide

Online Query and Help Commands (2)

man : View command help and manual pages; more complex info available via info.

help : Show help for built‑in shell commands such as 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 for files and 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 a file’s timestamps.

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

basename : Show the filename or directory name.

dirname : Show the path of a file or directory.

chattr : Change a file’s extended attributes.

lsattr : List a file’s extended attributes.

file : Determine the file type.

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

File Viewing and Content Processing (21)

cat : Concatenate files and output to the screen or redirect.

tac : Reverse the output of cat (display 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 delimiter and output selected fields.

split : Divide a file into smaller pieces.

paste : Merge lines of files side by side.

sort : Sort text lines in a file.

uniq : Remove duplicate lines.

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

iconv : Convert file encoding.

dos2unix : Convert DOS‑format files to UNIX format.

diff : Compare differences between files.

vimdiff : Visual file comparison in the terminal.

rev : Reverse the order of characters in each line.

grep/egrep : Filter text using regular expressions.

join : Join two files on a common field.

tr : Translate or delete characters.

vi/vim : Command‑line text editor.

File Compression and Extraction (4)

tar : Archive files.

unzip : Extract ZIP archives.

gzip : Compress files using gzip.

zip : Create ZIP archives.

Information Display Commands (11)

uname : Show operating‑system information.

hostname : Display or set the system’s hostname.

dmesg : Show kernel boot messages for diagnostics.

uptime : Display system uptime and load average.

stat : Show file or filesystem status.

du : Estimate disk space usage.

df : Report filesystem disk space usage.

top : Real‑time view of system resource usage.

free : Display memory usage.

date : Show or set the system date and time.

cal : Display a calendar.

File Search Commands (4)

which : Locate a binary in the PATH.

find : Search the filesystem for files or directories.

whereis : Locate binary, source, and manual page files.

locate : Find files using a prebuilt database ( updatedb updates it).

User Management Commands (10)

useradd : Add a new user.

usermod : Modify an existing user’s attributes.

userdel : Delete a user.

groupadd : Add a new group.

passwd : Change a user’s password.

chage : Change password expiration information.

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

su : Switch user identity.

visudo : Safely edit the /etc/sudoers file.

sudo : Execute a command as another user (default root) per sudoers rules.

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 between hosts.

route : Display or modify the kernel routing table.

ifconfig : View and configure network interfaces.

ifup : Bring a network interface up.

ifdown : Bring a network interface down.

netstat : Show network connections, routing tables, and interface statistics.

ss : Display socket statistics (modern replacement for netstat).

Advanced Network Operations (9)

nmap : Network scanning tool.

lsof : List open files and the processes using them.

mail : Send and receive email.

mutt : Command‑line email client.

nslookup : Interactive DNS query tool.

dig : DNS lookup utility.

host : Simple DNS query command.

traceroute : Trace the route packets take to a network host.

tcpdump : Command‑line packet capture tool.

Disk and Filesystem Commands (16)

mount : Mount a filesystem.

umount : Unmount a filesystem.

fsck : Check and repair a Linux filesystem.

dd : Convert and copy files, often used for low‑level copying.

dumpe2fs : Dump ext2/3/4 filesystem information.

dump : Backup ext2/3/4 filesystems.

fdisk : Partition disks up to 2 TB.

parted : Partition disks without size limits (commonly for <2 TB).

mkfs : Create a filesystem on a partition.

partprobe : Inform the kernel of partition table changes.

e2fsck : Check ext2/3/4 filesystems.

mkswap : Set up a Linux swap area.

swapon : Enable a swap area.

swapoff : Disable a swap area.

sync : Flush filesystem buffers to disk.

resize2fs : Resize ext2/3/4 filesystems.

System Permissions and Authorization (4)

chmod : Change file or directory permissions.

chown : Change file or directory owner and group.

chgrp : Change a file’s group ownership.

umask : Set the default permission mask for newly created files.

System User Login Information (7)

whoami : Show the effective username of the current user.

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.

users : List usernames of users currently logged in.

finger : Retrieve detailed information about a user.

Built‑in Commands and Others (19)

echo : Print text or variable values to the terminal.

printf : Format and print data.

rpm : Manage RPM packages.

yum : High‑level package manager for RPM‑based systems.

watch : Periodically execute a command and display its output.

alias : Define command aliases.

unalias : Remove command aliases.

date : Show or set the system date and time.

clear : Clear the terminal screen.

history : Show command history.

eject : Eject removable media such as a CD/DVD.

time : Measure the execution time of a command.

nc : Netcat – a versatile networking utility.

xargs : Build and execute command lines from standard input.

exec : Replace the shell with the specified command.

export : Set or display environment variables.

unset : Remove variables or functions.

type : Determine how a command would be interpreted (builtin, file, alias).

bc : Command‑line calculator.

System Management and Performance Monitoring (9)

<img src="https://mmbiz.qpic.cn/mmbiz_png/b96CibCt70iaajvl7fD4ZCicMcjhXMp1v6UXcBIdyPOYfUfaibicSXbZSrkFL9jwZRTUz8aKA1zXq1GDV8Z7uXeep6w/640" alt=""/>

chkconfig : Manage system services that start at boot.

vmstat : Report virtual memory statistics.

mpstat : Show CPU usage statistics.

iostat : Report CPU and I/O statistics.

sar : Collect, report, and save system activity information.

ipcs : Report inter‑process communication facilities.

ipcrm : Remove IPC objects (message queues, semaphores, shared memory).

strace : Trace system calls and signals.

ltrace : Trace library calls.

Shutdown / Reboot / Logout Commands (6)

shutdown : Power off the system.

halt : Halt the system.

poweroff : Turn off the power.

logout : Exit the current login shell.

exit : Exit the current shell.

Ctrl+d : Shortcut to exit the shell.

Process Management Commands (15)

bg : Resume a suspended 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 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 hangup signals.

pgrep : Search for processes matching criteria.

runlevel : Show the current system runlevel.

init : Change the system runlevel.

service : Start, stop, restart, or query system services.

Command LineUnixsystem-administration
Linux Cloud Computing Practice
Written by

Linux Cloud Computing Practice

Welcome to Linux Cloud Computing Practice. We offer high-quality articles on Linux, cloud computing, DevOps, networking and related topics. Dive in and start your Linux cloud computing journey!

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.