Operations 40 min read

Ultimate A‑Z Linux Command Cheat Sheet: Master System Operations

This comprehensive guide presents an A‑to‑Z reference of Linux commands, each accompanied by concise descriptions, enabling users to quickly look up, understand, and apply a wide range of system utilities for everyday administration and troubleshooting tasks.

Open Source Linux
Open Source Linux
Open Source Linux
Ultimate A‑Z Linux Command Cheat Sheet: Master System Operations

A

access : Checks whether a program can access a specified file, also used to test file existence.

accton : Starts or stops the accounting process or changes the accounting file.

aclocal : Automatically generates the aclocal.m4 file from configure.in.

acpi : Displays battery status and other ACPI information.

acpi_available : Tests whether the ACPI subsystem is available.

acpid : Provides intelligent power management, notifying user‑space programs of ACPI events.

addr2line : Converts an address into a file name and line number.

agetty : Manages physical or virtual terminals to allow multi‑user access.

alias : Replaces a string with another when a command is executed.

amixer : Command‑line mixer for ALSA sound drivers.

aplay : Command‑line audio player for ALSA sound drivers.

aplaymidi : Plays standard MIDI files via ALSA MIDI ports.

apropos : Helps users find commands when they remember keywords but not the exact name.

apt : High‑level CLI for package management, intended for end users.

apt-get : Command‑line tool for handling packages in Linux.

aptitude : Interactive interface for the package manager.

ar : Creates, modifies, and extracts files from archives.

arch : Prints the computer architecture.

arp : Manipulates the ARP cache, allowing full dump of the cache.

aspell : Spell checker for Linux.

atd : Job‑scheduling daemon that runs scheduled jobs later.

atrm : Removes specified jobs by job number.

atq : Shows the list of pending jobs for the user.

autoconf : Generates configuration scripts.

autoheader : Creates template header files for configure.

automake : Automatically generates GNU‑standard Makefile.in files.

autoreconf : Creates automatically buildable source code for Unix‑like systems.

autoupdate : Updates configure.in files to newer Autoconf versions.

awk : Scripting language for data manipulation and report generation.

B

banner : Prints a large ASCII string to standard output.

basename : Strips directory and suffix from a filename, printing the base name.

batch : Reads commands from standard input or a file and executes them when system load permits (average load < 1.5).

bc : Command‑line calculator.

bg : Moves a foreground job to the background.

biff : Mail notification system that alerts users of new mail.

bind : Sets Readline key bindings and variables.

bison : Parser generator similar to yacc.

break : Terminates for, while, or until loops.

builtin : Runs a shell builtin with arguments and returns its exit status.

bzcmp : Calls cmp on bzip2‑compressed files.

bzdiff : Compares bzip2‑compressed files.

bzgrep : Searches patterns in bzip2‑compressed files.

bzip2 : Compresses and decompresses files.

bzless : Faster viewing of large compressed files without reading the entire input first.

bzmore : Filters bzip2‑compressed files for CRT viewing.

C

cal : Shows a calendar for a specific month or year; defaults to the current month.

case : Best choice when multiple if/elif conditions are needed on a single variable.

cat : Reads data from files and outputs their contents.

cc : Compiles C source code and creates executables.

ccrypt : Command‑line tool for data encryption and decryption.

cd : Changes the current working directory.

cfdisk : Text‑based graphical interface for displaying or manipulating disk partition tables.

chage : Views and modifies user password expiration information.

chattr : Changes file attributes on a filesystem.

chfn : Changes a user's full name and other details.

chgrp : Changes group ownership of files or directories.

chkconfig : Lists all available services and views/updates their run‑level settings.

chmod : Changes file access permissions.

chown : Changes file owner or group.

chpasswd : Changes passwords for multiple users at once.

chroot : Changes the root directory.

chrt : Manipulates real‑time attributes of processes.

chsh : Changes a user's login shell.

chvt : Switches between available TTY terminals.

cksum : Displays a CRC value, byte count, and filename.

clear : Clears the terminal screen.

cmp : Compares two files byte‑by‑byte.

col : Filters reverse line feeds; reads from stdin and writes to stdout.

colcrt : Formats output of text processors for CRT displays.

colrm : Removes selected columns from a file.

column : Displays file contents in columns.

comm : Compares two sorted files line by line, showing common and unique lines.

compress : Reduces file size, adding a .Z extension.

continue : Skips the current iteration of for, while, or until loops.

cp : Copies files or directories.

cpio : Handles archive files such as *.cpio or *.tar.

cpp : C preprocessor that runs before compilation.

cron : Schedules tasks to run automatically at specified times.

crontab : List of scheduled commands.

csplit : Splits a file into sections based on user‑defined criteria.

ctags : Quickly accesses file definitions, such as function definitions.

cupsd : Scheduler for the Common UNIX Printing System (CUPS).

curl : Transfers data to or from a server using supported protocols.

cut : Extracts sections from each line of a file.

cvs : Version control system that stores file history and allows rollback.

D

date : Displays or sets the system date and time.

dc : Calculator that evaluates arithmetic expressions in postfix notation.

dd : Converts and copies files; primary utility for low‑level copying.

declare : Declares shell variables and functions, sets attributes, and displays values.

depmod : Generates dependency description lists for kernel modules.

df : Shows total and available space information for filesystems.

diff : Displays differences between files by line‑by‑line comparison.

diff3 : Compares three files line by line.

dir : Lists directory contents.

dirname : Strips trailing slashes from a pathname and prints the remainder.

dirs : Shows the list of remembered directories.

disable : Stops a printer or class.

dmesg : Checks the kernel ring buffer and prints kernel messages.

dmidecode : Retrieves hardware information such as CPU, RAM, BIOS in a readable format.

domainname : Returns the NIS domain name of the host.

dos2unix : Converts DOS text files to UNIX format.

dosfsck : Diagnoses and attempts to fix MS‑DOS filesystem issues.

dstat : Retrieves statistics from system components like network, I/O, CPU.

du : Tracks files and directories consuming excessive disk space.

dump : Backs up a filesystem to a storage device.

dumpe2fs : Prints superblock and block group information of a filesystem.

dumpkeys : Dumps the keyboard translation table.

E

echo : Displays a line of text/string passed as an argument.

ed : Line‑oriented text editor with minimal interface.

egrep : Prints lines matching extended regular expressions.

eject : Software‑controlled ejection of removable media.

emacs : Text editor with a simple user interface; operates in edit mode only.

enable : Starts a printer or class.

env : Prints environment variables; can run utilities in a custom environment.

eval : Executes arguments as a shell command.

ex : Line‑editing mode of the vi editor.

exec : Executes a command from within bash itself.

exit : Exits the currently running shell.

expa : Converts tabs to spaces; reads from stdin if no file is specified.

expect : Automates scripts that require user input.

export : Marks variables for export to child processes.

expr : Evaluates expressions and displays the result.

F

factor : Prints prime factors of a given number.

fc : Lists, edits, or re‑executes previously entered commands.

fc-cache : Scans font directories and builds caches for fontconfig.

fc-list : Lists available fonts and styles, optionally filtering.

fdisk : Dialog‑driven utility for creating and manipulating disk partition tables.

fg : Brings a background job to the foreground.

fgrep : Searches for fixed strings in files.

file : Determines file type, reporting human‑readable or MIME type.

find : Searches for files and directories and performs actions on them.

finger : Provides detailed information about logged‑in users.

fmt : Formats text files for simple optimization.

fold : Wraps each line of input to a specified width.

for : Repeats a set of commands for each element in a list.

free : Shows total and used memory and swap, plus kernel buffers.

Fun : Draws various patterns on the terminal.

function : Creates functions or methods.

G

g++ : Preprocesses, compiles, assembles, and links source code to produce executables.

gawk : Pattern scanning and processing language.

gcc : GNU Compiler Collection for C, C++, Objective‑C, and more.

gdb : GNU Debugger for programs written in C, C++, Ada, Fortran, etc.

getent : Retrieves entries from various databases.

gpasswd : Manages /etc/group and /etc/gshadow.

grep : Searches files for a specific character pattern and displays matching lines.

groupadd : Creates a new user group.

groupdel : Deletes an existing group.

groupmod : Modifies an existing group.

groups : Shows groups a user belongs to.

grpck : Verifies integrity of group information.

grpconv : Converts to shadow groups.

gs : Calls Ghostscript, interpreter for PostScript and PDF.

gunzip : Compresses or expands files or file lists.

gzexe : Compresses executable files and automatically decompresses them on execution.

gzip : Compresses files, producing a .gz file.

H

halt : Instructs hardware to stop all CPU functions, leading to reboot or shutdown.

hash : Maintains a hash table of recently executed programs.

hdparm : Retrieves and changes hard‑disk statistics, write cache, acoustic management, DMA settings.

Head : Prints the first N lines of input.

help : Shows information about shell built‑in commands.

hexdump : Filters and displays files in octal or other formats.

history : Views previously executed commands.

host : Performs DNS lookup operations.

hostid : Displays the host ID in hexadecimal.

hostname : Retrieves or sets the system's DNS or NIS domain name.

hostnamectl : API for controlling the host name and related settings.

htop : Interactive real‑time system resource monitor.

hwclock : Utility for accessing the hardware (real‑time) clock.

I

iconv : Converts text from one encoding to another.

id : Shows user and group names and numeric IDs.

if : Executes commands based on a condition.

ifconfig : Configures kernel‑resident network interfaces.

iftop : Network analysis tool for bandwidth statistics.

ifup : Activates a network interface.

import : Captures a screenshot of any active page and saves it as an image file.

info : Reads documentation in info format, providing detailed command information.

insmod : Inserts a module into the kernel.

install : Copies files and sets attributes.

iostat : Monitors I/O statistics for devices and partitions.

iotop : Shows detailed disk I/O usage per process.

ip : Performs various network management tasks.

ipcrm : Removes IPC resources, cleaning up objects and related data structures.

ipcs : Displays information about IPC facilities the calling process can read.

iptables : Sets and maintains tables for the IPv4 Netfilter firewall.

iptables-save : Saves current iptables rules to a user‑specified file.

iwconfig : Shows parameters and wireless statistics from /proc/net/wireless.

J

join : Joins lines of two files based on a common field.

journalctl : Views systemd, kernel, and journal logs.

K

kill : Manually terminates processes by sending signals.

L

last : Shows a list of all users who have logged in and out since /var/log/wtmp was created.

less : Views text files one page at a time.

let : Evaluates arithmetic expressions for shell variables.

ln : Creates links between files.

locate : Finds files by name.

look : Displays lines beginning with a given string.

lsblk : Shows detailed information about block devices.

lshw : Generates detailed hardware configuration information from /proc.

lsmod : Shows status of kernel modules.

lsof : Provides a list of open files.

lsusb : Shows information about USB buses and connected devices.

M

mailq : Prints the mail queue, listing messages awaiting delivery.

man : Displays the manual page for any command.

md5sum : Verifies data integrity using the MD5 algorithm.

mkdir : Creates one or more directories.

modinfo : Shows information about a Linux kernel module.

more : Views text files one screen at a time.

mount : Mounts a filesystem found on a device into the directory tree.

mpstat : Reports processor‑related statistics.

mv : Moves one or more files or directories.

N

nc (netcat) : Powerful network, security, or monitoring tool.

netstat : Shows various network information such as connections, routing tables, interface statistics.

nmcli : Controls NetworkManager; can display device status, create, edit, activate/deactivate, and delete connections.

nslookup : Queries DNS to obtain domain name or IP address mappings.

O

od : Converts input to octal or other formats, defaulting to octal.

P

passwd : Changes a user account password.

paste : Horizontally merges files, outputting lines from each file separated by tabs.

pidof : Finds the process ID of a running program.

ping : Checks network connectivity between host and server.

pinky : Provides detailed information about logged‑in users.

pmap : Shows memory mapping of a process.

poweroff : Sends an ACPI signal to power off the system.

printf : Displays formatted strings, numbers, or other data on the terminal.

ps : Lists currently running processes with their PID and other info.

pwd : Prints the current working directory path.

R

ranlib : Generates an index to an archive.

rcp : Copies files from one computer to another.

read : Reads a specified number of bytes from a file descriptor into a buffer.

readelf : Retrieves information from ELF (Executable and Linkable Format) files.

readlink : Prints the resolved symbolic link or canonical filename.

reboot : Indicates the system should restart.

rename : Renames files using a perlexpr regular expression.

reset : Reinitializes the terminal.

restore : Restores files from a backup created with dump.

return : Exits a shell function.

rev : Reverses lines character by character.

rm : Removes files, directories, symbolic links, etc.

rmdir : Removes empty directories.

rmmod : Removes a module from the kernel.

route : Used when working with IP/kernel routing tables.

rsync : Synchronizes files and directories between two hosts.

S

sar : Monitors system resources such as CPU, memory, I/O devices.

scp : Securely copies files between servers.

screen : Allows multiple shell sessions from a single SSH session.

script : Records all terminal activity.

scriptreplay : Replays recorded terminal activity from a typescript file.

sdiff : Compares two files and writes results side‑by‑side.

sed : Finds, filters, replaces, and manipulates text.

select : Creates a numbered menu for user selection.

seq : Generates numbers from FIRST to LAST in INCREMENT steps.

setsid : Runs a program in a new session.

shift : Shifts command‑line arguments left by one position.

showkey : Prints scan codes or key codes of each pressed key.

shred : Securely deletes files from a hard drive.

shutdown : Safely shuts down the system.

sleep : Creates a virtual job to delay execution.

source : Reads and executes file contents in the current shell.

sort : Sorts files according to a specified order.

split : Splits large files into smaller pieces.

ssh : Secure protocol for connecting to remote servers.

strace : Powerful process monitoring, diagnostic, and teaching tool.

stty : Changes and prints terminal line settings.

sudo : Prefix for commands that require super‑user privileges.

sum : Finds checksums and counts blocks in a file.

sync : Writes cached data to persistent storage.

systemctl : Checks and controls the systemd system and service manager.

T

tac : Concatenates and prints files in reverse order.

tail : Prints the last N lines of input.

tar : Creates and extracts archive files.

tee : Reads standard input and writes to standard output and files.

time : Executes a command and prints a summary of real, user CPU, and system CPU time.

top : Provides a dynamic real‑time view of a running system.

touch : Creates, changes, or modifies file timestamps.

tr : Translates or deletes characters.

tracepath : Traces the path to a destination, discovering MTU along the way.

traceroute : Prints the route packets take to a host.

tree : Recursively lists directories, generating an indented file list.

tty : Shows information about the terminal associated with standard input.

type : Describes how a command name would be interpreted.

U

uname : Displays system information.

unexpand : Converts spaces to tabs, writing output to standard output.

uniq : Reports or filters out repeated lines in a file.

unix2dos : Converts Unix text files to DOS format.

until : Executes a set of commands until the last command's exit status is zero.

uptime : Shows how long the system has been running.

useradd : Adds a user account to the system.

usermod : Changes user attributes via the command line.

username : Retrieves the username and its configuration.

users : Displays usernames of users currently logged in.

userdel : Deletes a user account and related files.

V

vi : Default visual editor for UNIX systems.

vmstat : Monitors performance, showing processes, memory, paging, block I/O, and CPU scheduling.

vnstat : Monitors network parameters such as bandwidth consumption.

W

w : Shows who is logged in and what they are doing.

wall : Displays a message, file content, or stdin on all logged‑in users' terminals.

watch : Periodically executes a program, displaying output fullscreen.

wc : Counts lines, words, bytes, and characters in files.

wget : Downloads files from a server, can run in background without user login.

whatis : Retrieves a one‑line description from a manual page.

which : Locates the executable associated with a given command by searching the PATH.

while : Repeats a set of commands as long as a command returns true.

who : Provides information about currently logged‑in users.

whoami : Displays the current user's username.

write : Allows communication by copying a line from one user's terminal to another.

X

xargs : Builds and executes commands from standard input, converting input into command arguments.

xdg-open : Opens a file or URL in the user's preferred application.

Y

yes : Prints a continuous stream of a given string; defaults to 'y' if no string is provided.

Z

zdiff : Calls diff on gzip‑compressed files.

zdump : Prints the current time in a specified time zone or all zones named on the command line.

zgrep : Searches for a pattern in files, even if they are compressed.

zip : Compression and archiving utility; stores each file in a .zip archive.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxShellUnix
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

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.