Linux Commands (A–Z)

 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

CommandDescription
accessChecks if a program has access to a specified file (useful for verifying file existence or permissions).
acctonEnables or disables process accounting, or changes the accounting file.
aclocalAutomatically generates aclocal.m4 files from configure.in.
acpiDisplays battery status and ACPI (Advanced Configuration and Power Interface) details.
acpidManages ACPI power management events and notifies user-space programs.
addr2lineConverts memory addresses to corresponding file names and line numbers.
agettyManages physical or virtual terminal login access (Linux version of getty).
aliasCreates command shortcuts by replacing one string with another.
amixerCommand-line mixer for ALSA (Advanced Linux Sound Architecture).
aplayCommand-line audio player for ALSA sound-card drivers.
aproposSearches the manual page names and descriptions for a given keyword.
aptHigh-level CLI for Debian-based package management (wrapper for apt-get and apt-cache).
apt-getHandles package installation, upgrade, and removal.
arCreates, modifies, or extracts files from archives.
archDisplays the system architecture (e.g., x86_64, aarch64).
arpManages the system ARP cache for IP address and MAC address mapping.

B – Commands

CommandDescription
basenameRemoves directory paths and suffixes, showing only the file name.
batchQueues jobs for execution when system load is low.
bcCommand-line calculator supporting precision arithmetic.
bgMoves suspended jobs to the background.
bisonParser generator similar to yacc.
breakExits a loop early (used within for, while, or until loops).
bzgrepSearches inside .bz2 compressed files using regular expressions.
bzip2Compresses or decompresses files using the bzip2 algorithm.
bzlessViews bzip2-compressed files without uncompressing entirely.

C – Commands

CommandDescription
calDisplays the calendar for a specific month or year.
catConcatenates and displays file content.
cdChanges the current working directory.
chmodModifies file permissions (read, write, execute).
chownChanges file owner and/or group.
clearClears the terminal screen.
cmpCompares two files byte-by-byte.
cpCopies files or directories.
cronAutomates scheduled tasks via crontab.
curlTransfers data from or to a server via supported protocols (HTTP, FTP, etc.).
cutExtracts specific sections (fields/columns) from files or input.

D – Commands

CommandDescription
dateDisplays or sets the system date and time.
ddConverts and copies files or disk images (useful for backups or USB creation).
dfDisplays disk space usage for mounted filesystems.
diffCompares files line-by-line and shows differences.
dmesgDisplays kernel ring buffer messages (hardware, drivers, boot logs).
duEstimates disk usage of files or directories.
dumpCreates a backup of a filesystem.

E – Commands

CommandDescription
echoDisplays a line of text or variable value.
egrepSearches using extended regular expressions.
envDisplays or modifies environment variables.
evalExecutes arguments as a shell command.
execReplaces the shell with the specified command.
exitExits the current shell session.
exportSets environment variables for child processes.

F – Commands

CommandDescription
findSearches for files and directories matching criteria.
fingerDisplays information about logged-in users.
freeShows system memory usage (RAM and swap).
fsckChecks and repairs a Linux filesystem.
ftpTransfers files between local and remote systems via FTP.
functionDefines reusable shell functions.

G – Commands

CommandDescription
g++GNU C++ compiler.
gccGNU Compiler Collection (for C, C++, and other languages).
gdbGNU Debugger for debugging programs.
grepSearches text for matching patterns.
groupaddAdds a new user group.
gzipCompresses files using GNU zip format.

H – Commands

CommandDescription
haltStops all CPU operations and halts the system.
headDisplays the first N lines of a file.
historyShows previously executed commands.
hostnameDisplays or sets the system hostname.
htopInteractive process viewer (advanced version of top).

I – Commands

CommandDescription
idPrints user and group information.
ifconfigDisplays or configures network interfaces.
iostatReports CPU and I/O statistics.
ipModern network configuration utility replacing ifconfig.
iptablesConfigures the IPv4 firewall.
iwconfigDisplays wireless network configurations.

K – Commands

CommandDescription
killTerminates processes using process ID (PID).
kmodManages Linux kernel modules.

L – Commands

CommandDescription
lessViews file content page-by-page.
lnCreates links (hard or symbolic).
locateQuickly finds files by name using pre-built database.
lsLists directory contents.
lsofLists open files and processes using them.

M – Commands

CommandDescription
manDisplays the manual page for any command.
mkdirCreates one or more directories.
mountMounts a filesystem or device.
mvMoves or renames files/directories.

N – Commands

CommandDescription
nanoSimple text editor for the terminal.
netstatDisplays network connections, routing tables, and interface stats.
nslookupQueries DNS for domain-to-IP mapping.

O – Commands

CommandDescription
odDisplays file contents in octal or other formats.

P – Commands

CommandDescription
passwdChanges user passwords.
pingTests network connectivity to a host.
psLists running processes.
pwdPrints the current working directory.

R – Commands

CommandDescription
rebootRestarts the system.
rmRemoves files or directories.
rmdirRemoves empty directories.
rsyncSynchronizes files/directories between two locations.

S – Commands

CommandDescription
scpSecurely copies files between systems.
sedStream editor for text manipulation and substitution.
shutdownSafely powers off or restarts the system.
sleepPauses execution for a given time.
sortSorts file contents line-by-line.
sshSecurely connects to remote systems.
sudoExecutes commands with superuser privileges.
systemctlControls and manages systemd services.

T – Commands

CommandDescription
tailDisplays the last N lines of a file.
tarCreates and extracts archive files.
topMonitors system processes in real time.
touchCreates empty files or updates timestamps.
trTranslates or deletes characters.
treeDisplays directory structure in a tree-like format.

U – Commands

CommandDescription
unameDisplays system information (kernel, OS, etc.).
uniqRemoves duplicate lines from sorted files.
uptimeShows how long the system has been running.
useraddAdds new user accounts.
usermodModifies user properties.
userdelDeletes user accounts.

V – Commands

CommandDescription
viText editor (visual mode editor in UNIX).
vmstatDisplays system performance (memory, CPU, processes).
vnstatMonitors and logs network bandwidth usage.

W – Commands

CommandDescription
watchRuns a command periodically and shows output.
wcCounts lines, words, and characters in a file.
wgetDownloads files from the web.
whoDisplays logged-in users.
whoamiDisplays the current logged-in username.

X–Z – Commands

CommandDescription
xargsBuilds and executes commands from standard input.
xdg-openOpens a file or URL in the default application.
yesPrints a continuous stream of a specified string (default: y).
zipCompresses files into .zip format.
zgrepSearches within .gz compressed files.
zdumpDisplays the current time in the specified timezone.

Comments

Popular posts from this blog

Cloud Computing Tutorial

History of Cloud Computing

Mastering Kubernetes Deployment Strategies: The Real-World Guide for DevOps, Cloud, and SRE Engineers