$linuxjunkies
>

Linux command reference

286 commands — synopsis, the flags that matter and real examples for each.

7z(1)

Create, extract, and manage 7z archives with high compression ratios.

aa-status(8)

Display the current AppArmor security profile status and loaded policy information.

alias(1)

Create or display shell aliases, which are custom shortcuts for commands.

ansible(1)

Run ad hoc commands and playbooks across remote hosts using SSH without requiring agents.

ansible-playbook(1)

Execute Ansible playbooks to automate infrastructure configuration and orchestration across multiple hosts.

ansible-vault(1)

Encrypt and decrypt sensitive data in Ansible playbooks and variable files.

apropos(1)

Search the manual page names and descriptions for a keyword.

apt(8)

Command-line interface for managing Debian packages; install, update, remove, and search for software.

apt-get(8)

apt-get is the command-line tool for managing packages in Debian-based Linux distributions.

atop(1)

atop is a system monitor for Linux that displays real-time per-process and system-wide resource usage including CPU, memory, disk I/O, and network activity.

autossh(1)

Automatically restart SSH sessions and tunnels when they drop.

awk(1)

awk is a text processing language that scans files line-by-line, splits records into fields, and performs pattern-action operations.

badblocks(8)

Search a device for bad blocks and optionally mark them as unusable.

bat(1)

A cat clone with syntax highlighting, line numbers, and git integration for viewing file contents.

bg(1)

Resume a suspended job in the background.

blkid(8)

Locate and identify block devices and their attributes like UUID, filesystem type, and labels.

bmon(1)

bmon is a portable bandwidth monitor and rate estimator that shows real-time network interface statistics.

borg(1)

Borg Backup is a deduplicating backup program that creates space-efficient, encrypted backups with a focus on security and performance.

bpftool(8)

Inspect and manage eBPF programs and maps on the Linux kernel.

bpftrace(8)

bpftrace is a high-level tracing language for dynamic instrumentation of the Linux kernel and applications using eBPF.

btop(1)

btop is a modern, interactive system monitor displaying CPU, memory, disk, and network usage with a colorful, user-friendly interface.

buildah(1)

Build OCI container images using rootless or root commands without requiring a daemon.

bzip2(1)

Compress or decompress files using the Burrows-Wheeler block-sorting text compression algorithm.

cal(1)

Display a calendar for a specified month or year.

cat(1)

Concatenate and print files to standard output.

cd(1)

Change the current working directory in the shell.

chgrp(1)

Change the group ownership of files or directories.

chmod(1)

Change file and directory permissions using symbolic or octal notation.

chown(1)

Change the owner and/or group of files or directories.

chroot(1)

Run a command or interactive shell with a different root directory.

chrt(1)

Run processes with a specified CPU scheduling class and priority, or change scheduling parameters of running processes.

collectd(8)

collectd is a daemon that collects system and application performance metrics and can store or forward them to various backends.

column(1)

Format input into multiple columns with aligned text.

comm(1)

Compare two sorted files line by line and output unique and common lines.

consul(8)

Consul is a distributed service mesh and service discovery tool that manages service registration, health checking, and network configuration across infrastructure.

containerd(8)

containerd is a daemon that manages container lifecycle and image operations on Linux systems.

cp(1)

Copy files and directories.

crictl(1)

crictl is a command-line interface for interacting with container runtimes that implement the Kubernetes Container Runtime Interface (CRI).

crontab(1)

Install, list, edit, or remove cron jobs for the current user.

cryptsetup(8)

cryptsetup manages LUKS encrypted volumes and dm-crypt device mappings on Linux.

csplit(1)

Split a file into pieces based on context lines or line numbers.

csvkit(1)

A suite of command-line tools for converting, querying, and analyzing CSV files.

curl(1)

Transfer data from or to a server using URLs, supporting HTTP, HTTPS, FTP, and many other protocols.

cut(1)

Remove sections from each line of files or stdin.

dash(1)

dash is a POSIX-compliant shell designed for speed and minimal size, commonly used as /bin/sh on modern Linux systems.

date(1)

Display or set the system date and time.

df(1)

Report file system disk space usage.

diff(1)

Compare two files line by line and show their differences.

dig(1)

Query DNS servers to look up domain names, IP addresses, and other DNS records.

dmesg(1)

Print or control the kernel ring buffer messages.

dnf(8)

DNF is a package manager for Linux systems that installs, updates, and removes software packages from configured repositories.

docker(1)

Manage Docker containers, images, networks, and volumes from the command line.

dpkg(1)

dpkg is the low-level package manager for Debian and Ubuntu systems, handling installation, removal, and management of .deb files.

dstat(1)

dstat is a versatile replacement for vmstat, iostat, netstat and ifstat that displays system resource statistics in real-time with customizable output.

du(1)

Summarize disk usage of files and directories, showing how much space each one occupies.

e2fsck(8)

Check and repair ext2/ext3/ext4 filesystems for consistency errors.

echo(1)

Display a line of text or variables to standard output.

env(1)

Run a command in a modified environment or display environment variables.

expand(1)

Convert tabs to spaces in text files.

export(1)

Set or display environment variables in the current shell and its child processes.

eza(1)

A modern replacement for ls that lists directory contents with colors, git integration, and better defaults.

fail2ban-client(1)

Interact with the Fail2ban server to manage jails, view status, and configure bans.

fd(1)

A fast alternative to find that searches for files and directories with simpler syntax and colorized output.

fdisk(8)

fdisk is a command-line utility for creating, deleting, and managing disk partitions on Linux systems.

fg(1)

Bring a background job to the foreground.

file(1)

Determine file type by examining contents and metadata.

find(1)

Search for files in a directory hierarchy matching specified criteria.

firewall-cmd(1)

Control the firewalld daemon and manage firewall rules dynamically without restarting the service.

fish(1)

fish is a user-friendly interactive shell and command language with syntax highlighting, autosuggestions, and intelligent tab completion.

flatpak(1)

Build, install, and manage Flatpak applications and runtimes in isolated environments.

flock(1)

Manage file locks from the shell, allowing exclusive or shared access to files or file descriptors.

fmt(1)

fmt reformats text to a specified line length, wrapping paragraphs and removing extra whitespace.

free(1)

Display total, used, and free memory in the system.

fsck(8)

Check and repair a Linux filesystem.

fx(1)

A command-line JSON processor that uses JavaScript for querying, filtering, and transforming JSON data interactively.

fzf(1)

A general-purpose command-line fuzzy finder that filters input interactively with a search interface.

gdb(1)

GNU Debugger — interactive debugging tool for inspecting and controlling program execution.

getenforce(1)

Display the current SELinux enforcement mode of the system.

glances(1)

A cross-platform system monitoring tool that displays real-time CPU, memory, disk, and network statistics in a curses-based dashboard.

glow(1)

Render markdown files and stdin to the terminal with syntax highlighting and formatting.

gpg(1)

Encrypt, decrypt, and sign files or data using the GNU Privacy Guard implementation of OpenPGP.

gpg2(1)

Encrypt, decrypt, and sign files or messages using GnuPG 2 with public-key cryptography.

grep(1)

Search for lines matching a pattern in files or stdin.

groupadd(8)

Create a new group account on the system.

gunzip(1)

Decompress files compressed with gzip, restoring them to their original form.

gzip(1)

Compress or decompress files using the DEFLATE algorithm.

hdparm(8)

Get and set SATA/IDE device parameters and performance characteristics.

head(1)

Output the first part of files.

helm(1)

Helm is the package manager for Kubernetes that helps you define, install, and upgrade Kubernetes applications.

history(1)

Display or manipulate the command history list in the current bash session.

host(1)

Perform DNS lookups to find IP addresses or hostnames associated with a domain.

hostnamectl(1)

Query and change the system hostname and other host settings.

htmlq(1)

Extract data from HTML using CSS selectors, similar to jq for JSON.

htop(1)

Display and interact with a real-time view of processes and system resource usage.

id(1)

Print user and group IDs and names for the current user or a specified user.

iftop(8)

Display bandwidth usage on an interface by socket connections in real-time.

iostat(1)

Report CPU and input/output statistics for devices and partitions.

iotop(1)

Display I/O usage by process on the system, sorted by I/O bandwidth in real-time.

ip(8)

Show and manipulate routing, network devices, interfaces, and tunnels.

iperf3(1)

iperf3 measures network bandwidth and performance between two hosts using TCP, UDP, or SCTP protocols.

iptables(8)

iptables is a command-line firewall utility for configuring Linux kernel netfilter packet filtering rules and network address translation (NAT).

jobs(1)

Display status of jobs in the current shell session.

journalctl(1)

Query and display messages from the systemd journal.

jq(1)

Parse, filter, and transform JSON data from the command line.

k3s(8)

k3s is a lightweight Kubernetes distribution that bundles the entire Kubernetes control plane and worker components into a single binary with minimal dependencies.

k9s(1)

A terminal UI and visual dashboard for managing Kubernetes clusters interactively.

kill(1)

Send a signal to a process, typically to terminate it.

killall(1)

Send a signal to all processes matching a given name.

kind(1)

kind is a tool for running local Kubernetes clusters using Docker containers as cluster nodes.

kubectl(1)

kubectl is the command-line interface for controlling Kubernetes clusters and managing containerized applications.

kustomize(1)

Kustomize lets you customize Kubernetes object configurations without modifying the original YAML files.

last(1)

Show a listing of last logins and logouts on the system.

less(1)

A pager program that displays file contents one screen at a time, allowing backward and forward navigation.

lldb(1)

LLDB is a next-generation debugger that debugs programs, attaches to running processes, and inspects core dumps.

ln(1)

Create links between files, allowing the same file to be accessed by different names or paths.

localectl(1)

Control the system locale and keyboard layout settings.

locate(1)

Find files by name using a pre-built database of the filesystem.

look(1)

Display lines beginning with a given string, using binary search on a sorted file.

ls(1)

List directory contents and file information.

lsblk(1)

List all block devices and their mount points in a tree or list format.

lscpu(1)

Display information about the CPU architecture and details from /proc/cpuinfo.

lsmod(8)

Display the status of modules in the Linux kernel.

lsof(1)

List open files and the processes that opened them.

lspci(1)

List all PCI devices on the system with vendor and device information.

lsscsi(8)

List SCSI devices and associated block devices on the system.

lsusb(1)

List all USB devices connected to the system with their vendor and product IDs.

ltrace(1)

Trace library calls made by a program and display their arguments and return values.

lvcreate(8)

Create a logical volume in an LVM volume group.

lvextend(8)

Extend the size of a logical volume on a Linux LVM system.

lvs(8)

Display information about logical volumes in a volume group.

lz4(1)

LZ4 is an extremely fast lossless compression algorithm and command-line tool for compressing and decompressing files.

lzop(1)

lzop compresses or decompresses files using the LZO algorithm for fast compression/decompression.

man(1)

Display manual pages for Linux commands, system calls, and file formats.

mdadm(8)

Create, manage, and monitor Linux software RAID arrays.

mdcat(1)

mdcat renders Markdown files in the terminal with syntax highlighting and formatting.

minikube(1)

minikube is a tool that runs a single-node Kubernetes cluster locally for development and testing.

mkdir(1)

Create one or more directories.

mkfs(8)

Create a filesystem on a block device or partition.

mkfs.btrfs(8)

Create a Btrfs filesystem on one or more block devices.

mkfs.ext4(8)

Create an ext4 filesystem on a device or partition.

mkfs.xfs(8)

Create an XFS filesystem on a device or partition.

modprobe(8)

Load or remove Linux kernel modules with automatic dependency resolution.

more(1)

Display text files one screen at a time with pagination.

mosh(1)

Mobile Shell provides a responsive remote terminal connection that survives network changes and roaming.

mount(8)

Attach a filesystem or storage device to the directory tree so its contents become accessible.

mpstat(1)

Report processor-related statistics and monitor CPU performance in real-time.

mtr(8)

Combines traceroute and ping functionality to diagnose network paths and measure latency to a destination host.

mv(1)

Move or rename files and directories.

nc(1)

Read and write data across network connections using TCP or UDP.

nethogs(8)

Display network traffic usage by process in real-time.

netstat(8)

Display network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.

nft(8)

nft is the command-line tool for configuring the netfilter packet filtering framework using the nftables ruleset language.

nice(1)

Run a command with a modified CPU scheduling priority.

nl(1)

Number the lines of files, outputting them with line numbers prepended.

nmcli(1)

NetworkManager command-line interface for controlling network connections and devices.

nohup(1)

Run a command immune to hangups, with output redirected to a file.

nomad(1)

Nomad is a flexible workload orchestrator that deploys and manages containers, VMs, and batch jobs across on-premise and cloud infrastructure.

nslookup(1)

Query DNS servers to resolve hostnames or IP addresses.

numfmt(1)

Convert numbers to or from human-readable formats (e.g., 1K, 2M, 3G).

nvme(1)

Interact with NVMe (Non-Volatile Memory Express) solid-state drives and manage their settings.

openssl(1)

OpenSSL is a toolkit for working with SSL/TLS certificates, cryptographic operations, and secure communications.

pacman(8)

pacman is the package manager for Arch Linux and Arch-based distributions, handling installation, removal, and updates of software packages.

pandoc(1)

Pandoc converts documents between different markup and word processing formats.

parted(8)

Create, resize, and manage disk partitions interactively or via command line.

passwd(1)

Change user password or password-related information.

paste(1)

Merge lines of files side-by-side, combining corresponding lines with a delimiter.

patch(1)

Apply a unified diff patch file to one or more source files.

pcp(1)

Performance Co-Pilot - a system performance monitoring and analysis framework.

perf(1)

Analyze CPU performance, trace system events, and profile running processes.

pgrep(1)

Search for processes by name and print their process IDs.

pidstat(1)

Report per-process CPU, memory, I/O, and context switch statistics.

ping(8)

Send ICMP ECHO_REQUEST packets to network hosts to check connectivity and measure latency.

pkill(1)

Send signals to processes by name or other attributes instead of by process ID.

pmap(1)

Display the memory map of a process, showing virtual memory layout and memory usage per mapping.

podman(1)

Podman is a tool for managing containers and container images using Open Container Initiative (OCI) standards, providing a Docker-compatible command interface.

pr(1)

Format text files for printing with pagination, headers, footers, and multi-column layouts.

printf(1)

Format and print text using a template string with variable substitution.

prlimit(1)

Get and set process resource limits.

ps(1)

Display information about running processes.

pstree(1)

Display a tree of processes showing parent-child relationships.

pvcreate(8)

Initialize a physical volume for use with LVM (Logical Volume Manager).

pvs(8)

Display information about physical volumes in LVM.

pwd(1)

Print the full pathname of the current working directory.

rclone(1)

Rclone is a command-line program to sync files and directories to and from cloud storage services.

renice(8)

Alter the scheduling priority of running processes.

restic(1)

A fast, secure, and efficient backup program that stores encrypted backups in local or remote repositories.

rev(1)

Reverse lines characterwise.

rg(1)

A fast, line-oriented search tool that recursively searches directories for a regex pattern, similar to grep but with sensible defaults and better performance.

rm(1)

Remove files or directories.

rmdir(1)

Remove empty directories from the filesystem.

rpm(8)

Query, install, update, and manage RPM package files on Red Hat-based Linux systems.

rsync(1)

rsync is a fast, versatile file synchronization tool that efficiently transfers and synchronizes files between local and remote systems.

runc(1)

A CLI tool for spawning and running containers according to the OCI Runtime Specification.

sar(1)

Collect, report, and save system activity information including CPU, memory, disk I/O, and network statistics.

schedtool(1)

Manipulate process CPU affinity and scheduling parameters on Linux.

scp(1)

Securely copy files between hosts using SSH protocol.

sdparm(8)

Access and modify SCSI device parameters and VPD pages.

sed(1)

sed is a stream editor that performs text transformations on input using regular expressions and editing commands.

service(8)

Run a System V init script or manage systemd services for system daemons.

setenforce(8)

Set the current SELinux enforcement mode (Enforcing, Permissive, or Disabled).

sftp(1)

Interactive secure file transfer program using SSH.

shuf(1)

Generate random permutations of input lines or numbers.

skopeo(1)

Inspect and manipulate container images and image repositories.

slabtop(1)

Display kernel slab cache statistics in real-time, showing memory usage of kernel objects.

sleep(1)

Delay for a specified amount of time.

smartctl(8)

Display or set SMART (Self-Monitoring, Analysis and Reporting Technology) attributes and thresholds on storage devices.

snap(1)

Install, manage, and control snap packages on Linux systems.

socat(1)

socat is a relay for bidirectional data transfer between two independent data channels.

sort(1)

Sort lines of text files in ascending or descending order based on specified keys and options.

split(1)

Split a file into smaller pieces by lines, bytes, or patterns.

ss(8)

Display socket statistics and network connection information, replacing the deprecated netstat command.

ssh(1)

OpenSSH remote login client for securely connecting to remote systems over the network.

ssh-add(1)

Add private key identities to the SSH authentication agent.

ssh-agent(1)

ssh-agent is a program that holds private SSH keys in memory and provides them to SSH clients when needed, eliminating the need to type passphrases repeatedly.

ssh-copy-id(1)

Install your public SSH key on a remote machine to enable password-less authentication.

ssh-keygen(1)

Generate, manage, and convert SSH public and private key pairs for authentication.

sshfs(1)

Mount a remote filesystem over SSH using FUSE.

stat(1)

Display detailed file and filesystem information including permissions, ownership, timestamps, and inode data.

strace(1)

Trace system calls and signals made by a process to diagnose problems and understand program behavior.

su(1)

Switch to another user account, or become the superuser (root).

sudo(8)

Execute a command as another user, typically the superuser (root), with privilege escalation.

sudo-i(8)

Run a login shell as root or another user with a complete environment.

sysctl(8)

View and modify kernel parameters at runtime without reboot.

systemctl(1)

Control the systemd system and service manager.

systemd-analyze(1)

Analyze systemd boot performance and service dependencies.

systemd-cgls(1)

Recursively show the contents of Linux control group hierarchies and their resource limits.

systemd-cgtop(1)

Show top control groups by their resource usage (CPU, memory, I/O).

systemd-mount(1)

Establish and manage temporary mount points for filesystems.

systemd-nspawn(1)

Spawn and manage lightweight containers with systemd, providing process and resource isolation.

systemd-resolve(1)

Resolve domain names, IPv4/IPv6 addresses, and DNS records using systemd's resolver service.

systemd-run(1)

Run a program in a new systemd unit, useful for setting resource limits, cgroups, and tracking processes.

systemd-tmpfiles(8)

Create, delete, and clean up temporary files and directories according to systemd tmpfiles.d configuration files.

tail(1)

Display the last part of files, useful for viewing log files and monitoring output in real time.

tar(1)

Create, extract, and manage tape archive files for backing up or distributing groups of files.

taskset(1)

Retrieve or set the CPU affinity (processor mask) of running processes.

tcpdump(1)

Capture and display network packets in real-time or save them to a file for analysis.

tee(1)

Read from standard input and write to standard output and files simultaneously.

telegraf(8)

Telegraf is a plugin-driven server agent for collecting and reporting metrics from systems, applications, and services.

terraform(1)

Terraform is an infrastructure-as-code tool that provisions and manages cloud resources declaratively across multiple providers.

time(1)

Run a program and report how long it takes, plus resource usage.

timedatectl(1)

Query and change the system time and date settings, timezone, and NTP synchronization status.

timeout(1)

Run a command with a time limit, killing it if it exceeds the specified duration.

tldr(1)

Display simple, practical examples for command-line tools from the tldr community.

top(1)

Display and update sorted information about the most CPU and memory intensive processes.

touch(1)

Create empty files or update the access and modification times of existing files.

tr(1)

Translate or delete characters from input text.

traceroute(8)

Traceroute prints the route packets take to reach a network host, showing each hop (gateway) along the path.

tree(1)

Display directory structure as a tree with indented lines showing files and subdirectories.

tshark(1)

Capture and analyze network packets from the command line, the non-GUI version of Wireshark.

tune2fs(8)

Adjust tunable file system parameters on ext2, ext3, and ext4 file systems.

ufw(8)

Uncomplicated Firewall (ufw) is a user-friendly interface for managing iptables firewall rules on Linux.

umask(1)

Set or display the file mode creation mask that determines default permissions for new files and directories.

umount(8)

Unmount file systems from the directory tree.

uname(1)

Print system information like kernel name, version, hardware platform, and hostname.

unexpand(1)

Convert spaces to tabs in text files.

uniq(1)

Filter or report on repeated lines in a file or input stream.

unrar(1)

Extract, test, and list files from RAR archives.

unzip(1)

Extract files from ZIP archives.

uptime(1)

Display how long the system has been running, along with current load average and number of logged-in users.

useradd(8)

Create a new user account on the system.

userdel(8)

Delete a user account and optionally remove their home directory and mail spool.

usermod(8)

Modify a user account's login name, UID, groups, home directory, shell, and other attributes.

valgrind(1)

Valgrind is a dynamic analysis tool that detects memory errors, memory leaks, and profiling issues in programs.

vgcreate(8)

Create a new LVM volume group from one or more physical volumes.

vgs(8)

Display information about volume groups in LVM (Logical Volume Manager).

visidata(1)

VisiData is an interactive terminal spreadsheet tool for exploring, analyzing, and transforming tabular data from various formats.

vmstat(8)

vmstat reports virtual memory statistics and system activity including processes, memory, paging, block I/O, interrupts, and CPU usage.

w(1)

Display information about currently logged-in users and their activities.

watch(1)

Execute a program periodically, full screen, showing output differences.

wc(1)

Count lines, words, and characters in files or standard input.

wg(8)

Configure and manage WireGuard VPN interfaces and peers.

wg-quick(8)

Set up and tear down WireGuard VPN interfaces with a simple configuration file.

wget(1)

Download files from the web using HTTP, HTTPS, or FTP protocols.

whereis(1)

Locate the binary, source, and manual page files for a command.

which(1)

Locate a command in the user's PATH and display its full path.

who(1)

Display information about users currently logged in to the system.

whoami(1)

Print the username of the current user.

xargs(1)

Build and execute commands from standard input, passing lines as arguments.

xfs_repair(8)

Repair a corrupted or inconsistent XFS filesystem.

xz(1)

Compress or decompress files using the XZ compression format with high compression ratios.

yq(1)

yq is a lightweight YAML, JSON, XML and CSV query and transformation tool that works like jq but for structured data formats.

yum(8)

yum is a package manager that installs, updates, and removes software packages on Red Hat-based Linux systems.

zip(1)

Create or modify compressed archive files in ZIP format.

zoxide(1)

A smarter cd command that learns your most-used directories and lets you jump to them with minimal typing.

zsh(1)

Zsh is an interactive login shell and command interpreter for Unix systems with advanced scripting features and customization.

zstd(1)

zstd is a fast real-time compression algorithm that provides high compression ratios with faster speed than gzip or bzip2.