Linux commands are the foundation of system control and management through the terminal — similar to Command Prompt in Windows. Linux commands are case-sensitive and cover a wide range of tasks such as file handling, process management, user administration, networking, and system monitoring.
Below is a comprehensive A–Z list of essential Linux commands, with clear descriptions of their purpose and use.
A – Commands
| Command | Description |
|---|
access | Checks if a program has access to a specified file (useful for verifying file existence or permissions). |
accton | Enables or disables process accounting, or changes the accounting file. |
aclocal | Automatically generates aclocal.m4 files from configure.in. |
acpi | Displays battery status and ACPI (Advanced Configuration and Power Interface) details. |
acpid | Manages ACPI power management events and notifies user-space programs. |
addr2line | Converts memory addresses to corresponding file names and line numbers. |
agetty | Manages physical or virtual terminal login access (Linux version of getty). |
alias | Creates command shortcuts by replacing one string with another. |
amixer | Command-line mixer for ALSA (Advanced Linux Sound Architecture). |
aplay | Command-line audio player for ALSA sound-card drivers. |
apropos | Searches the manual page names and descriptions for a given keyword. |
apt | High-level CLI for Debian-based package management (wrapper for apt-get and apt-cache). |
apt-get | Handles package installation, upgrade, and removal. |
ar | Creates, modifies, or extracts files from archives. |
arch | Displays the system architecture (e.g., x86_64, aarch64). |
arp | Manages the system ARP cache for IP address and MAC address mapping. |
B – Commands
| Command | Description |
|---|
basename | Removes directory paths and suffixes, showing only the file name. |
batch | Queues jobs for execution when system load is low. |
bc | Command-line calculator supporting precision arithmetic. |
bg | Moves suspended jobs to the background. |
bison | Parser generator similar to yacc. |
break | Exits a loop early (used within for, while, or until loops). |
bzgrep | Searches inside .bz2 compressed files using regular expressions. |
bzip2 | Compresses or decompresses files using the bzip2 algorithm. |
bzless | Views bzip2-compressed files without uncompressing entirely. |
C – Commands
| Command | Description |
|---|
cal | Displays the calendar for a specific month or year. |
cat | Concatenates and displays file content. |
cd | Changes the current working directory. |
chmod | Modifies file permissions (read, write, execute). |
chown | Changes file owner and/or group. |
clear | Clears the terminal screen. |
cmp | Compares two files byte-by-byte. |
cp | Copies files or directories. |
cron | Automates scheduled tasks via crontab. |
curl | Transfers data from or to a server via supported protocols (HTTP, FTP, etc.). |
cut | Extracts specific sections (fields/columns) from files or input. |
D – Commands
| Command | Description |
|---|
date | Displays or sets the system date and time. |
dd | Converts and copies files or disk images (useful for backups or USB creation). |
df | Displays disk space usage for mounted filesystems. |
diff | Compares files line-by-line and shows differences. |
dmesg | Displays kernel ring buffer messages (hardware, drivers, boot logs). |
du | Estimates disk usage of files or directories. |
dump | Creates a backup of a filesystem. |
E – Commands
| Command | Description |
|---|
echo | Displays a line of text or variable value. |
egrep | Searches using extended regular expressions. |
env | Displays or modifies environment variables. |
eval | Executes arguments as a shell command. |
exec | Replaces the shell with the specified command. |
exit | Exits the current shell session. |
export | Sets environment variables for child processes. |
F – Commands
| Command | Description |
|---|
find | Searches for files and directories matching criteria. |
finger | Displays information about logged-in users. |
free | Shows system memory usage (RAM and swap). |
fsck | Checks and repairs a Linux filesystem. |
ftp | Transfers files between local and remote systems via FTP. |
function | Defines reusable shell functions. |
G – Commands
| Command | Description |
|---|
g++ | GNU C++ compiler. |
gcc | GNU Compiler Collection (for C, C++, and other languages). |
gdb | GNU Debugger for debugging programs. |
grep | Searches text for matching patterns. |
groupadd | Adds a new user group. |
gzip | Compresses files using GNU zip format. |
H – Commands
| Command | Description |
|---|
halt | Stops all CPU operations and halts the system. |
head | Displays the first N lines of a file. |
history | Shows previously executed commands. |
hostname | Displays or sets the system hostname. |
htop | Interactive process viewer (advanced version of top). |
I – Commands
| Command | Description |
|---|
id | Prints user and group information. |
ifconfig | Displays or configures network interfaces. |
iostat | Reports CPU and I/O statistics. |
ip | Modern network configuration utility replacing ifconfig. |
iptables | Configures the IPv4 firewall. |
iwconfig | Displays wireless network configurations. |
K – Commands
| Command | Description |
|---|
kill | Terminates processes using process ID (PID). |
kmod | Manages Linux kernel modules. |
L – Commands
| Command | Description |
|---|
less | Views file content page-by-page. |
ln | Creates links (hard or symbolic). |
locate | Quickly finds files by name using pre-built database. |
ls | Lists directory contents. |
lsof | Lists open files and processes using them. |
M – Commands
| Command | Description |
|---|
man | Displays the manual page for any command. |
mkdir | Creates one or more directories. |
mount | Mounts a filesystem or device. |
mv | Moves or renames files/directories. |
N – Commands
| Command | Description |
|---|
nano | Simple text editor for the terminal. |
netstat | Displays network connections, routing tables, and interface stats. |
nslookup | Queries DNS for domain-to-IP mapping. |
O – Commands
| Command | Description |
|---|
od | Displays file contents in octal or other formats. |
P – Commands
| Command | Description |
|---|
passwd | Changes user passwords. |
ping | Tests network connectivity to a host. |
ps | Lists running processes. |
pwd | Prints the current working directory. |
R – Commands
| Command | Description |
|---|
reboot | Restarts the system. |
rm | Removes files or directories. |
rmdir | Removes empty directories. |
rsync | Synchronizes files/directories between two locations. |
S – Commands
| Command | Description |
|---|
scp | Securely copies files between systems. |
sed | Stream editor for text manipulation and substitution. |
shutdown | Safely powers off or restarts the system. |
sleep | Pauses execution for a given time. |
sort | Sorts file contents line-by-line. |
ssh | Securely connects to remote systems. |
sudo | Executes commands with superuser privileges. |
systemctl | Controls and manages systemd services. |
T – Commands
| Command | Description |
|---|
tail | Displays the last N lines of a file. |
tar | Creates and extracts archive files. |
top | Monitors system processes in real time. |
touch | Creates empty files or updates timestamps. |
tr | Translates or deletes characters. |
tree | Displays directory structure in a tree-like format. |
U – Commands
| Command | Description |
|---|
uname | Displays system information (kernel, OS, etc.). |
uniq | Removes duplicate lines from sorted files. |
uptime | Shows how long the system has been running. |
useradd | Adds new user accounts. |
usermod | Modifies user properties. |
userdel | Deletes user accounts. |
V – Commands
| Command | Description |
|---|
vi | Text editor (visual mode editor in UNIX). |
vmstat | Displays system performance (memory, CPU, processes). |
vnstat | Monitors and logs network bandwidth usage. |
W – Commands
| Command | Description |
|---|
watch | Runs a command periodically and shows output. |
wc | Counts lines, words, and characters in a file. |
wget | Downloads files from the web. |
who | Displays logged-in users. |
whoami | Displays the current logged-in username. |
X–Z – Commands
| Command | Description |
|---|
xargs | Builds and executes commands from standard input. |
xdg-open | Opens a file or URL in the default application. |
yes | Prints a continuous stream of a specified string (default: y). |
zip | Compresses files into .zip format. |
zgrep | Searches within .gz compressed files. |
zdump | Displays the current time in the specified timezone. |
Comments
Post a Comment