Linux Commands Library
Discover and learn about essential Linux commands with syntax, examples, and detailed explanations
Browse by Category
File Management
Manage files and directories on your system
User Management
Create, modify, and manage user accounts
Process Management
Monitor and control system processes
Networking
Network configuration and troubleshooting
Permissions
Manage file and directory permissions
Package Management
Install, update, and manage software packages
All Commands (426)
a2dismod
The <code>a2dismod</code> command is used to disable Apache2 modules. It removes symbolic links from the <code>/etc/apache2/mods-enabled</code> directory that were previously created by <code>a2enmod</code>. After disabling modules, Apache needs to be restarted to apply the changes.
a2dismod [OPTION]... [MODULE]...
a2dissite
The <code>a2dissite</code> command is used to disable Apache2 website configurations. It removes symbolic links from the <code>/etc/apache2/sites-enabled</code> directory that were previously created by <code>a2ensite</code>. After disabling sites, Apache needs to be restarted to apply the changes.
a2dissite [OPTION]... [SITE]...
a2enmod
The <code>a2enmod</code> command is used to enable Apache2 modules. It creates symbolic links from the <code>/etc/apache2/mods-available</code> directory to <code>/etc/apache2/mods-enabled</code>. After enabling modules, Apache needs to be restarted to apply the changes.
a2enmod [OPTION]... [MODULE]...
a2ensite
The <code>a2ensite</code> command is used to enable Apache2 website configurations. It creates symbolic links from the <code>/etc/apache2/sites-available</code> directory to <code>/etc/apache2/sites-enabled</code>. After enabling a site, Apache needs to be restarted to apply the changes.
a2ensite [OPTION]... [SITE]...
ab
The <code>ab</code> (Apache Benchmark) command is a performance testing tool for HTTP servers. It shows how your Apache installation performs by generating load to the server. This tool quickly identifies how many requests per second your Apache server is capable of handling.
ab [options] [http[s]://]hostname[:port]/path
abort
The <code>abort</code> command is used to terminate a process abnormally. It generates a core dump and can be used to diagnose program errors or forcefully stop a process that is not responding.
abort [--help] [--version]
ac
The <code>ac</code> command prints statistics about users' connect time on a Unix system. It reads the <code>/var/log/wtmp</code> file (or the file specified with the -f option) and reports the total connect time for all users or individual users.
ac [options] [users...]
access
The <code>access</code> command checks whether the calling user or process has access permissions for a file or files. It returns 0 (success) if the user has the specified access rights, and non-zero (failure) otherwise.
access [-acfmrwx] [-e] [-h] file ...
aclocal
The <code>aclocal</code> command is part of the GNU Autotools suite. It generates an <code>aclocal.m4</code> file by scanning <code>configure.ac</code> or <code>configure.in</code> for uses of autoconf macros and collecting the required macro definitions into a single file for use with autoconf.
aclocal [OPTION]...
add-apt-repository
The <code>add-apt-repository</code> command adds a new repository to the list of available APT package sources. It can add both standard repositories and Personal Package Archives (PPAs) to the system.
add-apt-repository [options] repository
addgroup
The <code>addgroup</code> command creates a new group on the system. It is a more user-friendly alternative to the lower-level <code>groupadd</code> command, and is commonly used on Debian-based Linux distributions like Ubuntu.
addgroup [options] [--gid ID] [--system] [--group] group
adduser
The <code>adduser</code> command creates a new user account on the system with a home directory and other default settings. It is a higher-level, more user-friendly alternative to the lower-level <code>useradd</code> command.
adduser [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--encrypt-home] [--add_extra_groups] [--quiet] user
alias
The <code>alias</code> command creates or lists command aliases, allowing users to create shortcuts for longer commands or to customize command behavior with predefined options.
alias [name[=value] ...]
alsamixer
The <code>alsamixer</code> command provides a text-based user interface for adjusting audio volume and settings using the ALSA (Advanced Linux Sound Architecture) sound system.
alsamixer [options]
amixer
The <code>amixer</code> command is a command-line mixer for ALSA (Advanced Linux Sound Architecture) sound card drivers, allowing users to control audio settings and volume from the terminal.
amixer [options] [command]
anacron
The <code>anacron</code> command runs commands periodically with a frequency specified in days, executing tasks that may have been missed while the system was powered off, unlike cron which requires the system to be running at the scheduled time.
anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [-S spooldir] [job...]
apropos
The <code>apropos</code> command searches the manual page names and descriptions for keywords and displays a list of matching manual pages. It's essentially equivalent to using <code>man -k</code> and is useful for finding commands related to a specific topic when you don't know the exact command name.
apropos [OPTION...] KEYWORD...
apt
The <code>apt</code> command is a high-level package management tool for Debian and Ubuntu-based Linux distributions, providing a user-friendly interface for installing, updating, removing, and managing software packages.
apt [options] command
apt-cache
The <code>apt-cache</code> command is used to query the APT package cache on Debian-based systems, providing information about available packages, dependencies, versions, and package details.
apt-cache [options] command
apt-get
The <code>apt-get</code> command is a powerful command-line tool for handling packages in Debian and Ubuntu-based Linux distributions, providing functionalities for installing, upgrading, configuring, and removing software packages.
apt-get [options] command
apt-key
The <code>apt-key</code> command is used to manage the keys used by apt to authenticate packages. These keys are used to ensure that the packages downloaded by apt are from trusted sources.
apt-key [options] command [arguments]
apt-mark
The <code>apt-mark</code> command is used to mark packages as manually or automatically installed and to manipulate the dpkg selections, such as hold, unhold, install, or remove.
apt-mark [options] {auto|manual|hold|unhold|showauto|showmanual|showhold} [package...]arch
The <code>arch</code> command displays the machine architecture name of the current system. It is a simple command that prints the hardware name in a standard format.
arch
arecord
The <code>arecord</code> command is a command-line sound recorder and player for the ALSA (Advanced Linux Sound Architecture) sound system. It can be used to record audio from various input sources such as microphones, line-in, and capture monitors.
arecord [options] [filename]
arp
The <code>arp</code> command manipulates or displays the kernel's IPv4 network neighbor cache. It can add entries to the table, delete entries, or display the current content of the ARP cache.
arp [-vn] [-H type] [-i if] [-a] [hostname] arp [-v] [-i if] -d hostname [pub] arp [-v] [-H type] [-i if] -s hostname hw_addr [temp] arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub arp [-v] [-H type] [-i if] -Ds hostname ifname [netmask nm] pub
arping
The <code>arping</code> command sends ARP (Address Resolution Protocol) requests to a neighboring host or gateway and displays the responses. It is useful for network troubleshooting, checking for duplicate IP addresses, and confirming connectivity at the link layer.
arping [options] destination
as
The <code>as</code> command is the GNU assembler. It is used to convert assembly language code into object files that can be linked to create executable programs. It is a key component in the compilation toolchain.
as [options] -o objfile file.s
aspell
The <code>aspell</code> command is a spell checker that can be used interactively or in batch mode to check the spelling of text files. It offers suggestions for misspelled words and can be customized with different dictionaries and personal word lists.
aspell [options] <command>
at
The <code>at</code> command is used to schedule commands to be executed once at a later time. Unlike cron, which is used for recurring tasks, at is ideal for one-time scheduled tasks.
at [-V] [-q queue] [-f file] [-mMlv] timespec... at [-V] [-q queue] [-f file] [-mMkv] [-t time]
atq
The <code>atq</code> command lists the pending jobs for the at command scheduler. It displays the job number, date, hour, queue, and username for each scheduled task.
atq [-V] [-q queue] [-v]
atrm
The <code>atrm</code> command removes jobs that were previously scheduled with the <code>at</code> command. It deletes jobs from the queue of tasks to be run at a later time.
atrm [-V] job [job...]
authorized_keys
The <code>~/.ssh/authorized_keys</code> file is a configuration file that specifies which SSH public keys are allowed to log into a user's account without a password. Each line of the file contains one public key, and the file is used by the SSH server to authenticate users via public key authentication.
Located at: ~/.ssh/authorized_keys
awk
The <code>awk</code> command is a powerful text processing tool that treats each line of a file as a record and each word as a field. It's designed for pattern scanning and processing, making it excellent for data extraction and reporting from text files.
awk [options] 'program' file... awk [options] -f program-file file...
basename
The <code>basename</code> command strips directory and suffix from filenames. It is used to extract just the filename from a path or to remove a suffix from a filename.
basename NAME [SUFFIX] basename OPTION... NAME...
bash
The <code>bash</code> (Bourne-Again SHell) is a command processor that typically runs in a text window where the user types commands that cause actions. Bash can also read and execute commands from a file, called a shell script.
bash [options] [file [arguments]] bash [options] -c command_string [arguments]
batch
The <code>batch</code> command reads commands from standard input or a specified file and executes them when system load levels permit. Unlike <code>at</code>, which executes commands at a specific time, <code>batch</code> executes commands when the system load average drops below a threshold.
batch [file]
bc
The <code>bc</code> (basic calculator) is an arbitrary precision calculator language with syntax similar to C. It allows for interactive calculations as well as programming with variables, functions, and control statements.
bc [options] [file...] bc -l [file...]
beep
The <code>beep</code> command generates a beep sound through the PC speaker or sound card. It's useful for providing audio notifications or alerts in scripts or terminal applications.
beep [options]
bg
The <code>bg</code> command continues a suspended job in the background. It allows you to resume the execution of jobs that have been suspended (using Ctrl+Z) while returning control of the terminal to you.
bg [job_spec...]
blkid
The <code>blkid</code> command is a utility to locate and print block device attributes such as filesystem type, UUID, and volume label. It's commonly used for device identification and mounting filesystems.
blkid [options] [device...]
blockdev
The <code>blockdev</code> command is used to call block device ioctls from the command line. It allows administrators to get or set various attributes of block devices such as hard drives, SSDs, or partitions.
blockdev [options] [commands] device
blogbench
The <code>blogbench</code> command is a benchmarking tool that simulates a busy file server by performing a mix of read, write, and rewrite operations similar to a blog server, allowing you to test the I/O performance of your storage devices.
blogbench [options] -d /path/to/test/directory
bluetoothctl
The <code>bluetoothctl</code> command is an interactive command-line tool for controlling and managing Bluetooth devices on Linux systems. It provides a comprehensive set of functions for scanning, pairing, connecting, and configuring Bluetooth devices from the terminal.
bluetoothctl [command]
brctl
Ethernet bridge administration tool for Linux
brctl [OPTIONS] COMMAND [BRIDGE] [INTERFACE]
break
The <code>break</code> command is a shell built-in that exits from a <code>for</code>, <code>while</code>, <code>until</code>, or <code>select</code> loop. It terminates the execution of the current loop and continues with the next command after the loop.
break [n]
bridge
Manage bridge addresses and devices with the iproute2 package
bridge [OPTIONS] COMMAND
btrfs
Control and manage the Btrfs filesystem in Linux
btrfs [COMMAND] [OPTIONS] <args>
bunzip2
Decompress files compressed with bzip2
bunzip2 [OPTIONS] [FILE...]
bzcat
Decompress bzip2 files to standard output
bzcat [OPTIONS] [FILE...]
bzcmp
Compare bzip2 compressed files
bzcmp [cmp_options] FILE1 [FILE2]
bzdiff
Compare bzip2 compressed files line by line
bzdiff [OPTIONS] FILE1 [FILE2] bzmore [OPTIONS] FILE1 [FILE2]
bzgrep
Search for patterns in bzip2 compressed files
bzgrep [OPTIONS] PATTERN [FILE...] bzfgrep [OPTIONS] PATTERN [FILE...] bzegrep [OPTIONS] PATTERN [FILE...]
bzip2
The <code>bzip2</code> command compresses files using the Burrows-Wheeler block sorting text compression algorithm and Huffman coding. It generally achieves better compression than gzip but is slower.
bzip2 [options] [filenames...] bunzip2 [options] [filenames...]
bzip2recover
Recover data from damaged bzip2 files
bzip2recover [damaged_file.bz2]
bzless
View bzip2 compressed files using the less pager
bzless [options] file.bz2
bzmore
View bzip2 compressed files using the more pager
bzmore [file.bz2 ...]
cat
The <code>cat</code> command is one of the most frequently used commands in Linux/Unix-like operating systems. <code>cat</code> stands for "concatenate" and it can read, concatenate, and write file contents to the standard output.
cat [OPTION]... [FILE]...
cd
The <code>cd</code> command is used to change the current working directory in Linux/Unix systems. <code>cd</code> stands for "change directory" and it's one of the most essential commands for navigating the filesystem.
cd [OPTION] [DIRECTORY]
cfdisk
Display or manipulate a disk partition table with a curses interface
cfdisk [options] [device]
chattr
Change file attributes on a Linux file system
chattr [OPTION]... [+-=][ATTRIBUTES]... FILE...
chgrp
Change group ownership of files or directories
chgrp [OPTION]... GROUP FILE... chgrp [OPTION]... --reference=RFILE FILE...
chkconfig
Tool for managing services in SysV init systems
chkconfig [--list] [--type type] [name] chkconfig --add name chkconfig --del name chkconfig [--level levels] name <on|off|reset|resetpriorities>
chmod
Change file mode bits (permissions)
chmod [OPTION]... MODE[,MODE]... FILE... chmod [OPTION]... OCTAL-MODE FILE... chmod [OPTION]... --reference=RFILE FILE...
chown
Change file owner and group
chown [OPTION]... [OWNER][:[GROUP]] FILE... chown [OPTION]... --reference=RFILE FILE...
chroot
Run command or interactive shell with special root directory
chroot [OPTION] NEWROOT [COMMAND [ARG]...]
cksum
Calculate CRC checksum and byte count for a file
cksum [OPTION]... [FILE]...
cmp
Compare two files byte by byte
cmp [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]
col
The <code>col</code> command filters reverse line feeds and converts whitespace in its input to spaces or tabs. It's primarily used to process text files containing backspace characters and other control characters often generated by certain text processors.
col [OPTION]...
comm
Compare two sorted files line by line
comm [OPTION]... FILE1 FILE2
command
Run a command, ignoring shell functions and aliases
command [-pVv] command [arg ...]
compress
Compress files using the Lempel-Ziv coding
compress [-cfvd] [-b bits] [file ...]
cp
The <code>cp</code> command is used to copy files and directories from one location to another. It's one of the core utilities in Linux and Unix-like operating systems that supports various options for preserving attributes, handling symbolic links, and creating backups.
cp [OPTION]... SOURCE... DIRECTORY cp [OPTION]... -t DIRECTORY SOURCE...
cpio
Copy files to and from archives
cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message] [-O [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--format=format] [--message=message] [--null] [--reset-access-time] [--verbose] [--dot] [--append] [--block-size=blocks] [--dereference] [--io-size=bytes] [--quiet] [--force-local] [--rsh-command=command] [--help] [--version] < name-list [> archive]
cpio {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file] [-H format] [-M message] [-R [user][:.][group]] [-I [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--make-directories] [--nonmatching] [--preserve-modification-time] [--numeric-uid-gid] [--rename] [--list] [--swap-bytes] [--swap] [--dot] [--unconditional] [--verbose] [--block-size=blocks] [--swap-halfwords] [--io-size=bytes] [--pattern-file=file] [--format=format] [--owner=[user][:.][group]] [--no-preserve-owner] [--message=message] [--force-local] [--no-absolute-filenames] [--sparse] [--only-verify-crc] [--quiet] [--rsh-command=command] [--help] [--version] [pattern...] [< archive]
cpio {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]] [--null] [--reset-access-time] [--make-directories] [--link] [--preserve-modification-time] [--unconditional] [--verbose] [--dot] [--dereference] [--owner=[user][:.][group]] [--no-preserve-owner] [--sparse] [--help] [--version] destination-directory < name-listcrontab
Schedule and manage cron jobs
crontab [-u user] file crontab [-u user] [-l | -r | -e] [-i]
csplit
Split a file into sections determined by context lines
csplit [OPTION]... FILE PATTERN...
curl
The <code>curl</code> command is a versatile tool for transferring data to or from a server using various protocols. It supports HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP, POP3, IMAP, SMTP, and many more. Primarily used for testing APIs, downloading files, and data transfer operations without user interaction.
curl [options] [URL...]
cut
The <code>cut</code> command is used to extract sections from each line of input. It can extract by character position, field separated by a delimiter, or bytes.
cut OPTION... [FILE]...
cvt
The <code>cvt</code> command calculates VESA CVT (Coordinated Video Timing) modelines for use with X server. It generates the appropriate modeline parameters for a given resolution and refresh rate.
cvt width height [refresh]
date
The <code>date</code> command displays or sets the system date and time. It can format the output in various ways, convert between time zones, and perform date arithmetic.
date [OPTION]... [+FORMAT] date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
dc
The <code>dc</code> command is an arbitrary precision calculator with reverse Polish notation. It supports unlimited precision arithmetic and features both interactive and script-based usage.
dc [options] [file...]
dd
The <code>dd</code> command is a powerful utility for converting and copying files with the ability to manipulate the data as it is being copied. It's often used for tasks such as backing up boot sectors, creating disk images, and performing low-level operations on storage devices.
dd [OPERAND]...
debootstrap
The <code>debootstrap</code> command is used to install a basic Debian or Ubuntu system into a subdirectory of another, already installed system. It can be used to create a chroot environment, a container base image, or the first stage of a Debian-based operating system installation.
debootstrap [options] suite target [mirror [script]]
declare
The <code>declare</code> command is a built-in shell command in Bash that declares variables and sets their attributes. It allows for specifying variable types and properties, providing more control over how variables behave in shell scripts.
declare [options] [name[=value]]...
delgroup
Remove a group from the system
delgroup [options] GROUP
deluser
The <code>deluser</code> command is used to remove users from the system. It is a friendlier frontend to the <code>userdel</code> command, providing additional options to manage user removal, including handling of the user's home directory and mail spool.
deluser [options] user deluser --group [options] group
depmod
Generate a dependency file for kernel modules
depmod [options] [version]
df
Report file system disk space usage
df [OPTION]... [FILE]...
diff3
Compare three files line by line
diff3 [OPTION]... MYFILE OLDFILE YOURFILE
dig
Query DNS servers for various DNS records and perform DNS lookups
dig [@server] [name] [type] [options]
dir
List directory contents, similar to the ls command
dir [OPTION]... [FILE]...
dircolors
Set up color configuration for ls command output
dircolors [OPTION]... [FILE]
dirname
Strip last component from a file path, returning the directory part
dirname [OPTION] NAME...
dirs
Display the list of currently remembered directories in the directory stack
dirs [OPTION]
dmesg
Display or control the kernel ring buffer messages
dmesg [options]
dmidecode
Display hardware information from the BIOS/UEFI DMI tables
dmidecode [options]
dmsetup
Low-level logical volume management tool for Device Mapper
dmsetup [options] [command] [command_args]
dos2unix
Convert text file line endings from DOS/Windows format to Unix format
dos2unix [options] [file ...]
du
Estimate file space usage for files and directories
du [OPTION]... [FILE]...
dump
Backup utility for ext2/3/4 filesystems
dump [-level] [-flags] filesystem [files-to-dump]
dumpe2fs
Dump ext2/ext3/ext4 filesystem information
dumpe2fs [options] device
echo
The <code>echo</code> command displays text or variables to standard output. It is one of the simplest yet most frequently used commands in shell scripting, allowing users to print messages, variable values, or command outputs to the terminal or redirect them to files.
echo [OPTION]... [STRING]...
egrep
Search for patterns using extended regular expressions
egrep [options] pattern [file...]
eject
Eject removable media such as CD/DVD discs or USB drives
eject [options] [device]
enable
Enable and disable shell built-in commands
enable [-a] [-dnps] [-f filename] [name ...]
env
Display, set, or remove environment variables
env [option]... [name=value]... [command [args]...]
ethtool
Display or modify Ethernet device settings
ethtool [options] devname
exec
Replace the current shell process with a specified command
exec [-cl] [-a name] [command [arguments...]]
expand
The <code>expand</code> command converts tabs in files to spaces. It's useful for ensuring consistent text formatting and making files more compatible with various text editors or display environments that might handle tabs differently.
expand [OPTION]... [FILE]...
export
Set environment variables for child processes
export [-fn] [name[=value] ...] or export -p
expr
Evaluate expressions and display the results
expr EXPRESSION
fgrep
Search for fixed strings in files
fgrep [options] pattern [file...]
find
The <code>find</code> command is used to search for files and directories in a directory hierarchy based on various criteria. It's one of the most powerful and flexible commands for locating files in a Linux/Unix system.
find [starting-point...] [expression]
finger
Display information about system users
finger [options] [user[@host]]
flock
Manage file locks from shell scripts
flock [options] file|directory command [arguments]
fmt
The <code>fmt</code> command is a simple text formatter that rewraps text paragraphs to fit within specified width limits. It's useful for formatting documentation, README files, and other plain text content to improve readability.
fmt [OPTION]... [FILE]...
fold
Wrap input lines to fit specified width
fold [options] [file...]
for
Shell loop construct for iterating through lists
for name [in words ...]; do commands; done for (( expr1; expr2; expr3 )); do commands; done
free
Display amount of free and used memory in the system
free [options]
fsck
Check and repair a Linux filesystem
fsck [options] [filesystem...]
fstat
Display status information about open files
fstat [-f filename] [-M core] [-N system] [-p pid] [-u user] [file ...]
ftp
The <code>ftp</code> command is a standard network file transfer program that allows you to transfer files between your local machine and remote servers using the File Transfer Protocol (FTP). It provides both interactive and automated modes for transferring files, managing directories, and controlling file permissions on remote servers.
ftp [options] [host [port]]
fuser
The <code>fuser</code> command identifies processes using files or sockets. It helps you find which processes are accessing specific files, directories, or sockets, making it useful for troubleshooting and system administration. You can also use it to send signals to these processes, allowing you to terminate applications that are preventing operations like unmounting filesystems.
fuser [options] file|directory... fuser [options] [-n namespace] name...
gawk
Pattern scanning and processing language - GNU version
gawk [options] -f program-file [file...]
getconf
Query system configuration variables
getconf [options] variable_name [pathname]
getent
Get entries from administrative database
getent database [key...]
getfacl
Display file access control lists
getfacl [options] file ...
getopts
Parse command options in shell scripts
getopts optstring name [arg...]
grep
The <code>grep</code> command is used to search for text patterns in files. It's a powerful tool for finding specific content in files or filtering command output based on regular expressions or string patterns.
grep [options] pattern [file...]
groff
The <code>groff</code> command (GNU troff) is a document formatting system that converts marked-up text files to formatted documents for display or printing. It's used for creating man pages, technical documentation, and other formatted documents with precise typographical control.
groff [OPTION]... [FILE]...
grub-install
Install GRUB bootloader on a device
grub-install [options] [--target=target] [device]
grub-mkconfig
Generate a GRUB configuration file
grub-mkconfig [options]
gunzip
Decompress files compressed with gzip
gunzip [options] [file...]
hash
Display or manipulate the bash command hash table
hash [-lr] [-p pathname] [-dt] [name]
help
The <code>help</code> command displays information about built-in shell commands. It provides a quick way to access documentation on bash shell commands directly from the terminal, showing their purpose, syntax, and available options.
help [PATTERN...]
hexdump
Display file contents in hexadecimal, decimal, octal, or ASCII
hexdump [options] file
history
Display or manipulate the command history list
history [options] [n]
hostname
Show or set the system hostname
hostname [options] [name]
htop
The <code>htop</code> command is an enhanced interactive process viewer for Linux systems. It provides a full-color terminal interface that displays system summary information and a list of processes in a more user-friendly way than the traditional top command. htop offers advanced features like vertical and horizontal scrolling, tree view, and mouse operation.
htop [options]
iconv
Convert text from one character encoding to another
iconv [options] [-f from-encoding] [-t to-encoding] [input-file]...
ifconfig
Configure or display network interface parameters
ifconfig [interface] [options] [address]
ifdown
Take down a network interface
ifdown [options] [interface]
import
Capture an X server screen and save the image to a file
import [options] filename
info
The <code>info</code> command provides access to the GNU Info system, which offers comprehensive hypertext documentation for many GNU utilities and programs. Unlike <code>man</code> pages, which typically offer concise reference material, Info documents are more extensive, structured hierarchically, and include hyperlinks for easier navigation between topics.
info [OPTION]... [MENU-ITEM...]
inotifywait
Wait for changes to files using inotify
inotifywait [options] [file/directory...]
inotifywatch
Gather filesystem access statistics using inotify
inotifywatch [options] [file/directory...]
install
Copy files and set attributes
install [options] source... destination
iostat
Report CPU statistics and input/output statistics for devices and partitions
iostat [options] [device...] [interval [count]]
ip
Show / manipulate routing, network devices, interfaces and tunnels
ip [options] object [command [arguments]]
ipcalc
Calculate IP address information
ipcalc [options] [ip_address[/prefix]]
iperf
Measure network performance
iperf [-s|-c host] [options]
iproute2
A collection of utilities for controlling TCP/IP networking and traffic control in Linux
Various commands including ip, tc, ss, bridge, rtacct, rtmon, etc.
iptables
Administration tool for IPv4 packet filtering and NAT
iptables [-t table] command [chain] [rule-specification] [options]
iptraf
Interactive colorful IP LAN monitor
iptraf [-h|-f|-z|-i interface|-g|-d interface|-s interface|-l|-t facility]
jobs
Display status of jobs in the current shell session
jobs [-lnprs] [jobspec]
join
Join lines of two files on a common field
join [options] file1 file2
journalctl
Query and display messages from the systemd journal
journalctl [OPTIONS...] [MATCHES...]
kbd
A collection of tools for managing Linux console (keyboard and fonts)
Various commands including loadkeys, setfont, showkey, etc.
kdestroy
Destroy Kerberos tickets
kdestroy [-A] [-q] [-c cache_name] [-p principal_name]
keepalive
TCP keepalive configuration utility for network connections
keepalive [options]
kill
The <code>kill</code> command is used to send signals to processes, typically to terminate them. By default, it sends the TERM (terminate) signal, but it can send any specified signal to a process identified by its process ID (PID). The kill command is essential for process management and system administration tasks.
kill [options] PID...
killall
The <code>killall</code> command terminates processes by name rather than by process ID (PID). It can kill multiple processes with the same name simultaneously, making it more convenient than the <code>kill</code> command when you don't know or don't want to look up process IDs. Like <code>kill</code>, it can send any signal to the specified processes.
killall [options] name...
kinit
Obtain and cache Kerberos ticket-granting ticket
kinit [options] [principal]
last
Show listing of last logged in users
last [options] [username...] [tty...]
lastb
Show listing of last bad login attempts
lastb [options] [username...] [tty...]
lastlog
Display information about the most recent login of all users
lastlog [options]
less
File pager that allows backward and forward navigation through file contents
less [options] file...
let
Perform arithmetic operations on shell variables
let expression [expression ...]
link
Create a hard link to a file
link source_file target_file
ln
The <code>ln</code> command is used to create links between files in Linux/Unix systems. It can create both hard links and symbolic (soft) links, allowing multiple filenames to point to the same file or directory.
ln [OPTION]... [-T] TARGET LINK_NAME ln [OPTION]... TARGET ln [OPTION]... TARGET... DIRECTORY ln [OPTION]... -t DIRECTORY TARGET...
loadkeys
Load keyboard translation tables
loadkeys [options] [keymap]
locate
The <code>locate</code> command quickly finds files by name on a Linux system. It searches a database built by <code>updatedb</code> rather than scanning the filesystem in real-time, making it much faster than <code>find</code> for basic file name searches.
locate [OPTION]... PATTERN...
logger
Add entries to the system log
logger [options] [message]
look
Display lines beginning with a given string
look [options] string [file]
losetup
Set up and control loop devices
losetup [options] [loopdev] [file]
lpc
Line printer control program
lpc [command [argument ...]]
lprm
Remove jobs from the print queue
lprm [options] [job_id...]
ls
The <code>ls</code> command is one of the most basic and frequently used commands in Linux/Unix systems. <code>ls</code> stands for "list" and it lists the contents of directories, showing files and subdirectories.
ls [OPTION]... [FILE]...
lsattr
List file attributes on a Linux file system
lsattr [options] [files...]
lsblk
List information about block devices
lsblk [options] [device...]
lscpu
Display information about the CPU architecture
lscpu [options]
lslogins
Display information about user accounts
lslogins [options] [username...]
man
The <code>man</code> command is used to display the manual pages (documentation) for commands, utilities, functions, and files in Unix-like operating systems. It provides a standardized way to access comprehensive documentation for almost every command and feature available on the system.
man [OPTION]... [SECTION] NAME...
mandb
The <code>mandb</code> command creates or updates the manual page index caches (databases) used by <code>man</code>, <code>apropos</code>, and <code>whatis</code>. It indexes the contents of all manual pages to enable fast searching based on names, descriptions, and keywords.
mandb [OPTION...]
mapfile
Read lines from standard input into an indexed array variable
mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
md5sum
Compute and check MD5 message digest
md5sum [OPTION]... [FILE]...
mkdir
The <code>mkdir</code> command is used to create directories (folders) in Linux/Unix systems. <code>mkdir</code> stands for "make directory" and is essential for organizing files and creating new storage locations.
mkdir [OPTION]... DIRECTORY...
mke2fs
Create an ext2/ext3/ext4 filesystem
mke2fs [options] device [blocks-count]
mknod
Make block or character special files
mknod [OPTION]... NAME TYPE [MAJOR MINOR]
mktemp
Create a temporary file or directory
mktemp [OPTION]... [TEMPLATE]
mlocate
The <code>mlocate</code> command (Merging Locate) is a secure implementation of the locate command that maintains file ownership/permission information and merges new file entries incrementally. It provides a fast way to search the filesystem by using a previously built database.
mlocate [OPTION]... PATTERN...
mmv
Move/rename multiple files using patterns
mmv [options] from_pattern to_pattern
more
Display file content one screen at a time
more [options] [file...]
mount
Mount a filesystem
mount [-t fstype] [-o options] device dir
mtr
Network diagnostic tool combining ping and traceroute
mtr [options] hostname
mutt
Text-based email client for Unix-like systems
mutt [options] [-Z] [-f mailbox] [-e command] [--] [addresses...]
mv
The <code>mv</code> command is used to move or rename files and directories in Linux and Unix-like operating systems. It can move files between directories and rename them in a single operation while preserving file attributes.
mv [OPTION]... SOURCE... DIRECTORY mv [OPTION]... -t DIRECTORY SOURCE...
myisamchk
Check, repair, or optimize MyISAM tables in MySQL databases
myisamchk [options] tbl_name [...]
myisamlog
Display contents of MyISAM log file
myisamlog [options] [log_file [table_name] ...]
namei
Follow a pathname until a terminal point is found
namei [options] pathname [pathname...]
nano
A simple command-line text editor
nano [options] [[+line[,column]] file]...
nc
Netcat utility for reading from and writing to network connections
nc [options] [hostname] [port]
netcat
Networking utility for reading from and writing to network connections
netcat [options] [hostname] [port]
netstat
Display network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
netstat [options]
nice
Run a command with modified scheduling priority
nice [option] [command [arguments...]]
nmap
Network exploration tool and security scanner
nmap [scan type] [options] {target specification}nohup
Run a command immune to hangups, with output to a non-tty
nohup COMMAND [ARG]...
nroff
The <code>nroff</code> command is a text formatting program for Unix/Linux that formats documents for display on terminals and line printers. It's a component of the groff document formatting system specifically tailored for producing plain text output.
nroff [OPTION]... [FILE]...
nslookup
Query Internet name servers for domain name or IP address mapping
nslookup [options] [hostname/IP] [server]
ntfsfix
Fix common errors and force Windows to check NTFS filesystem
ntfsfix [options] device
ntpdate
Set the system date and time via NTP
ntpdate [options] server [server...]
ntpq
NTP query utility for monitoring NTP daemon ntpd operations
ntpq [options] [host...]
numactl
Control NUMA policy for processes or shared memory
numactl [options] -- program [arguments]
objcopy
Copy and translate object files
objcopy [options] input-file [output-file]
objdump
Display information from object files
objdump [options] file...
open
Open files, directories, or URLs with default applications
open [options] file/URL...
openssl
Cryptography and SSL/TLS toolkit
openssl command [command_options] [command_arguments]
openvpn
Secure Virtual Private Network daemon
openvpn [options] [config_file]
opkg
Lightweight package management system for embedded Linux devices
opkg [options] sub-command [arguments]
parted
A disk partition manipulation program
parted [options] [device [command [arguments]...]]
patch
Apply a diff file to an original
patch [options] [originalfile [patchfile]]
pathchk
Check whether file names are valid or portable
pathchk [options] name...
perf
Performance analysis tool for Linux
perf [--version] [--help] [OPTIONS] COMMAND [ARGS]
perl
The Perl 5 language interpreter
perl [options] [program_file] [arguments]
pg_dump
Extract a PostgreSQL database into a script file or other archive file
pg_dump [connection-option...] [option...] [dbname]
pg_restore
Restore a PostgreSQL database from an archive file created by pg_dump
pg_restore [connection-option...] [option...] [filename]
pkill
The <code>pkill</code> command sends signals to processes based on their name and other attributes. It's a more flexible alternative to <code>killall</code>, allowing pattern matching and filtering by various process attributes like terminal, parent PID, user, and more. This makes it a powerful tool for targeted process management.
pkill [options] pattern
popd
Remove a directory from the directory stack
popd [+N | -N]
pr
The <code>pr</code> command formats text files for printing. It can paginate text with headers and footers, create multi-column output, merge files side by side, and adjust various formatting elements like margins and page length.
pr [OPTION]... [FILE]...
printenv
Print all or part of the environment
printenv [OPTION]... [VARIABLE]...
ps
The <code>ps</code> command displays information about active processes running on the system. It provides a snapshot of the current processes along with detailed information about resource usage, status, and other process attributes.
ps [options]
qemu
Quick Emulator, a generic machine emulator and virtualizer
qemu-system-[arch] [options] [disk_image]
quota
Display disk usage and limits for a user or group
quota [options] [user|group]
quotacheck
Scan a filesystem for disk usage and create, check, or repair quota files
quotacheck [options] [filesystem...]
ram
Create a RAM disk or display information about RAM disks
ram [options] size
ramdisk
Create and manage RAM-based virtual disk drives
ramdisk [options] [size]
read
Read a line from standard input or a file descriptor
read [options] [variable...]
readarray
Read lines from standard input into an array variable
readarray [options] array
readonly
Mark variables or functions as read-only
readonly [options] [name[=value] ...]
rename
Rename multiple files using pattern substitution
rename [options] expression replacement file...
renice
Alter priority of running processes
renice priority [[-p] pid...] [[-g] pgrp...] [[-u] user...]
rm
The <code>rm</code> command is used to remove files and directories in Linux/Unix systems. <code>rm</code> stands for "remove" and it's a powerful command that can delete files, directories, and their contents permanently.
rm [OPTION]... [FILE]...
rmdir
The <code>rmdir</code> command is used to remove empty directories from the filesystem in Linux/Unix systems. <code>rmdir</code> stands for "remove directory" and is a safe way to delete directories as it will only work if the directory is empty.
rmdir [OPTION]... DIRECTORY...
rsync
The <code>rsync</code> command is a fast, versatile file copying and synchronization tool that efficiently transfers and synchronizes files between directories or across computers. It is widely used for backups, mirroring, and maintaining identical copies of data.
rsync [OPTION]... SRC [SRC]... DEST rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST rsync [OPTION]... [USER@]HOST:SRC [DEST]
rtcwake
Enter a system sleep state until specified wakeup time
rtcwake [options]
runlevel
Display the current and previous system runlevel
runlevel [options]
runuser
Run a command with substitute user and group ID
runuser [options] -u user [--] [command [args...]]
sar
Collect, report, or save system activity information
sar [options] [interval [count]]
scp
The <code>scp</code> (Secure Copy) command is used to securely transfer files between hosts on a network. It uses SSH for data transfer and provides the same authentication and security as SSH. SCP is ideal for safely copying files across untrusted networks.
scp [OPTION] [[user@]src_host:]file1 ... [[user@]dst_host:]file2
sdiff
Side-by-side merge of file differences
sdiff [options] file1 file2
sed
The <code>sed</code> command (stream editor) is used for parsing and transforming text files line by line. It's a powerful tool for text manipulation that performs operations like search, find and replace, insertion, and deletion on text streams.
sed [OPTION]... {script} [input-file]...
sed [OPTION]... -f script-file [input-file]...select
Create an interactive selection menu in the shell
select name [in words ...]; do commands; done
seq
Print a sequence of numbers
seq [options] [first [increment]] last
set
Set or unset shell options and positional parameters
set [options] [arguments]
setfacl
Set file access control lists (ACLs)
setfacl [options] acl_spec file...
sftp
The <code>sftp</code> (Secure File Transfer Protocol) command provides an interactive file transfer program with functionality similar to FTP but operates over an encrypted SSH connection. It offers secure file transfer capabilities with additional features like resuming transfers and directory operations.
sftp [OPTION] [[user@]host[:file [file]]]
shift
Shift positional parameters in a shell script
shift [n]
shutdown
Shut down, reboot, or halt the system
shutdown [options] [time] [message]
sleep
Delay for a specified amount of time
sleep number[suffix]...
source
Execute commands from a file in the current shell
source filename [arguments]
sqlite3
Command-line interface for SQLite 3 databases
sqlite3 [options] [database] [SQL statements]
ssh
The <code>ssh</code> (Secure Shell) command is a secure protocol used to remotely connect to and manage systems over an encrypted network connection. It allows for secure remote logins, command execution, file transfers, and port forwarding with strong encryption and authentication mechanisms.
ssh [options] [user@]hostname [command]
ssh-add
The <code>ssh-add</code> command adds SSH private keys to the SSH authentication agent (ssh-agent). It allows you to load your keys into memory so you can use SSH without entering your passphrase each time, while keeping your keys securely encrypted on disk.
ssh-add [options] [file ...]
ssh-agent
The <code>ssh-agent</code> command starts an authentication agent that can store private keys for SSH authentication. It allows users to authenticate to SSH servers without having to constantly re-enter their private key passphrase, providing both convenience and security by keeping keys encrypted on disk but available for use during a session.
ssh-agent [options] [command [args ...]]
ssh-copy-id
The <code>ssh-copy-id</code> command installs an SSH public key on a remote server as an authorized key. This enables secure passwordless SSH logins to the remote system, allowing you to authenticate using your private key instead of typing your password each time.
ssh-copy-id [options] [-i [identity_file]] [user@]hostname
ssh-keygen
The <code>ssh-keygen</code> command is used to generate, manage, and convert authentication keys for SSH (Secure Shell). It creates public/private key pairs for secure passwordless authentication, and provides various options for key type selection, key conversion, and key management.
ssh-keygen [options]
strace
Trace system calls and signals
strace [options] [command [args]]
strings
Print the printable character sequences in files
strings [options] [file...]
sudo
Execute a command as another user
sudo [options] [command]
sum
Compute checksum and count blocks in a file
sum [options] [file...]
svc
Control services monitored by supervise or daemontools
svc [options] service_directories...
swapoff
Disable devices and files for swapping
swapoff [options] [special]
swapon
Enable devices and files for swapping
swapon [options] [special]
sync
Synchronize cached writes to persistent storage
sync [options] [file...]
sysctl
Configure kernel parameters at runtime
sysctl [options] [variable[=value]] [...]
systemctl
Control the systemd system and service manager
systemctl [options] command [name...]
systemd
System and service manager for Linux operating systems
systemd [options...]
systool
View and manage sysfs devices, buses, drivers, and modules
systool [options] [path...]
tac
Concatenate and print files in reverse (opposite of cat)
tac [OPTION]... [FILE]...
tar
Tape Archive: create, extract, and manipulate archive files
tar [options] [archive-file] [file or directory to be archived]
taskset
Set or retrieve a process's CPU affinity
taskset [options] mask command [argument...] taskset [options] -p [mask] pid
tcpdump
Dump network traffic, analyze and capture packets
tcpdump [options] [expression]
tee
The <code>tee</code> command reads from standard input and writes to both standard output and one or more files simultaneously. This allows you to view output in your terminal while also saving it to a file, making it invaluable for logging and debugging.
tee [OPTION]... [FILE]...
telinit
Change SysV init runlevel or systemd system state
telinit [option] <runlevel>
test
Check file types and compare values
test EXPRESSION [ EXPRESSION ] [ OPTION
time
Measure program execution time
time [options] command [arguments...]
timeout
Run a command with a time limit
timeout [OPTION] DURATION COMMAND [ARG]...
times
Display process time information for the current shell and its children
times
top
The <code>top</code> command provides a dynamic real-time view of a running system. It displays system summary information and a list of processes or threads currently being managed by the Linux kernel. It shows CPU usage, memory usage, swap usage, and the most CPU-intensive tasks running on the system, all updated in real-time.
top [options]
touch
Change file timestamps or create empty files
touch [OPTION]... FILE...
tr
The <code>tr</code> command (translate) is used to translate, squeeze, and/or delete characters from standard input, writing to standard output. It's a simple yet powerful tool for character-level text transformations.
tr [OPTION]... SET1 [SET2]
traceroute
Print the route packets take to a network host
traceroute [options] host [packetsize]
trap
Set up signal handlers in shell scripts
trap [OPTIONS] [[ARG] SIGNAL...]
troff
The <code>troff</code> command (typesetter roff) is a document formatting system for Unix-like operating systems that formats text for typesetter and printing devices. It's the foundation of the groff formatting system and provides detailed control over document typography and layout.
troff [OPTION]... [FILE]...
tty
Print the file name of the terminal connected to standard input
tty [OPTION]...
tunctl
Create and manage persistent TUN/TAP interfaces
tunctl [-t device-name] [-u owner] [-g group] [-b] [-f tun-clone-device] [-d device-name]
type
Display information about command type
type [-afptP] name [name ...]
udevadm
udev management tool for device detection and configuration
udevadm [--help] [--version] [--debug] COMMAND [OPTIONS]
ulimit
Get and set user limits for system resources
ulimit [-HSabcdefiklmnpqrstuvxPT] [limit]
umount
Unmount file systems
umount [options] <source> | <directory>
unexpand
The <code>unexpand</code> command converts spaces in files to tabs. It's the counterpart to the expand command and is useful for reducing file size or formatting files according to specific requirements that prefer tabs over spaces.
unexpand [OPTION]... [FILE]...
uniq
Report or omit repeated lines
uniq [OPTION]... [INPUT [OUTPUT]]
units
Convert quantities between different units
units [options] [from-unit [to-unit]]
unset
Remove variable or function names from the shell environment
unset [-fv] [name ...]
unshare
Run program in new namespaces
unshare [options] [program [arguments]]
until
Execute commands until a condition is true
until test-commands; do consequent-commands; done
updatedb
The <code>updatedb</code> command updates the file name database used by the <code>locate</code> command. It scans your filesystem and builds a database of file names and locations, which allows for fast file searches without having to scan the filesystem in real-time.
updatedb [OPTION...]
uptime
Tell how long the system has been running
uptime [options]
useradd
Create a new user or update default new user information
useradd [options] LOGIN
userdel
Delete a user account and related files
userdel [options] LOGIN
users
Print the usernames of users currently logged in
users [OPTION]... [FILE]
usleep
Suspend execution for microsecond intervals
usleep microseconds
uudecode
Decode a file created by uuencode
uudecode [options] [file...]
uuencode
Encode a binary file into ASCII for transmission
uuencode [-m] [file] name
vdir
List directory contents in a verbose, multi-column format
vdir [OPTION]... [FILE]...
vmstat
Report virtual memory statistics
vmstat [options] [delay [count]]
w
Show who is logged on and what they are doing
w [options] [user]
wait
Wait for process completion and return exit status
wait [options] [id...]
watch
Execute a program periodically, showing output fullscreen
watch [options] command
wc
Print newline, word, and byte counts for files
wc [OPTION]... [FILE]...
wget
The <code>wget</code> command is a non-interactive network downloader that retrieves files from the web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. Unlike interactive browsers, wget can work in the background, after users log off, retrieving files recursively and creating local versions of remote sites.
wget [options] [URL...]
whatis
The <code>whatis</code> command displays brief manual page descriptions. It searches the manual page names and displays a brief description from the manual page header. This is particularly useful for quickly finding out what a command does without reading the full manual page.
whatis [OPTION]... KEYWORD...
whereis
Locate the binary, source, and manual page files for a command
whereis [options] name...
which
The <code>which</code> command locates the executable file associated with a given command by searching the directories listed in the PATH environment variable. It helps determine which version of a program will be executed when you type a command in the terminal.
which [OPTION]... COMMAND...
who
Show who is logged on the system
who [OPTION]... [FILE | ARG1 ARG2]
xargs
Build and execute command lines from standard input
xargs [options] [command [initial-arguments]]
xclip
Command line interface to X clipboard selections
xclip [options]
xdg-open
Open a file or URL with the default application
xdg-open {file|URL}xfs
XFS filesystem utilities and commands
xfs tools are a suite of commands: xfs_admin, xfs_repair, xfs_db, etc.
xfs_check
Check XFS filesystem consistency (deprecated in favor of xfs_repair)
xfs_check [-f] [-i ino]... [-b bno]... special
xfs_repair
Repair an XFS filesystem
xfs_repair [-nfdPLvVm] [-o options] [-l logdev] [-r rtdev] [-t interval] device
xinput
A utility to configure and test X input devices
xinput [options] [command] [device]
xkill
Force close unresponsive X clients by killing their associated windows
xkill [-button number] [-frame] [-id resource] [-all] [-display displayname]
xrandr
Command line interface to X RandR extension for screen resolution and display configuration
xrandr [options] [--output output] [output-options]
xscreensaver
Extensible screen saver and locker for the X Window System
xscreensaver [options]
ypbind
NIS (Network Information Service) client process that binds to an NIS server
ypbind [options]
ypcat
Print the values of all keys in an NIS (Network Information Service) database
ypcat [options] mapname
ypmatch
Print the values of one or more keys from an NIS (Network Information Service) map
ypmatch [options] key... mapname
yppasswd
Change your network password in the NIS (Network Information Service) database
yppasswd [user]
ypwhich
Return hostname of NIS server or map master
ypwhich [options] [host] ypwhich [-m [mapname]]
yum
Package manager for RPM-based Linux distributions
yum [options] command [package...]
zcat
Display the contents of compressed files without explicitly decompressing them
zcat [options] [file...]
zdiff
Compare compressed files
zdiff [options] file1 file2 zcmp [options] file1 file2
zegrep
Search compressed files for extended regular expressions
zegrep [options] pattern [file...]
zfgrep
Search compressed files for fixed strings
zfgrep [options] pattern [file...]
zforce
Force a .gz extension on gzip compressed files
zforce [file...]
zgrep
Search compressed files for a regular expression
zgrep [options] pattern [file...]
zip
Package and compress (archive) files
zip [options] zipfile files...
zless
View compressed files with the less pager
zless [options] file...
zsh
Z Shell - an extended Bourne shell with numerous improvements and additional features
zsh [options] [file [arguments...]]
Master Linux Commands
Enhance your Linux skills by learning these essential commands. Perfect for beginners and experienced users alike.
Explore All Commands