100+ common Linux command with explanation

Updated 29 October 2024

alias - defines an alias for the specified command at - runs a specified script or command at a set later time. atq - shows jobs in the at utility queue. atrm - deletes the specified job from the at utility queue.

awk - pattern scanning and processing language

bash - uses the Bourne Again Shell command language to interpret commands from standard input or a file, or to launch a subshell.

bc - Performs calculations via its programming language.

bind - binds a keyboard sequence to a readline function or macro.

break - exits from a for , while , select , or until loop.

builtin - executes the specified shell built‐in command.

bzip2 - compresses using the Burrows–Wheeler block sorting text compression algorithm and Huffman coding.

caller - returns the context of any active subroutine call.

case - selectively executes commands based on pattern.

cd - changes the current directory to the specified directory. cat - lists the contents of the specified file. change - changes the password expiration date for the specified system user account.

chfn - changes the specified user account's current information. chgrp - changes the default group of the specified file or directory. chmod - changes system security permissions for the specified file or directory

chown - changes the default owner of the specified file or directory. chpasswd - reads a file of login name and password pairs and updates the passwords. chsh - changes the specified user account's default shell.

clear - clears text from a terminal emulator or virtual console. terminal.

command - executes the specified command without the normal shell lookup.

compgen - generates possible completion matches for the specified word.

complete - displays how the specified words would be completed.

compopt - changes options for how the specified words would be completed. compress - original Unix file compression utility.

continue - resumes the next iteration of a for , while , select , or until loop. coproc - spawns a subshell in background mode and executes the designated command or executes a coprocess. cp - copies the specified files to an alternate location.

crontab - initiates the editor for the user's cron table file, if allowed. cut - removes a designated portion of each specified file's lines or text from the STDIN.

date - displays the date in various formats.

declare - declares a variable or variable type.

dirs - displays a list of currently remembered directories

disown - removes the specified jobs from the jobs table for the process. df - displays current disk space statistics for all mounted devices.

dialog - creates window dialogs in a text environment du - displays disk usage statistics for the specified file path.

emacs - invokes the Emacs text editor. env - executes the designated program in a modified environment or displays the value of all the environment variables.

exit - closes your terminal emulator or performs a normal termination of current process.

export - sets the specified variables to be available for child shell processes. expr - evaluates the designated expression.

echo - displays a given string to standard output (STDOUT).

enable - enables or disables the specified built‐in shell command.

eval - concatenates the specified arguments into a single command, and executes the command.

exec - replaces the shell process with the specified command.

false - sets a result to failed status.

fc - selects a list of commands from the history list. fdisk - organizes and creates the specified disk's partition table. file - displays the file type of the specified file.

find - performs a recursive search for files.

fg - resumes a job in foreground mode.

for - xxecutes set commands for every item in the list. free - checks available and used memory on the system. fsck - checks and optionally repairs designated filesystem.

function - defines a shell script function.

getopts - parses the specified positional parameters.

gawk - streams editing using programming language commands. grep - searches a file for the specified pattern. gedit - invokes the GNOME Desktop editor. getopt - parses command options, including long options. gdialog - Creates window dialogs for GNOME Shell. groups - displays group membership of the effective user. groupadd - creates a new system group. groupmod - modifies an existing system group.

gunizip - the GNU Project's reversal of compression using Lempel–Ziv compression.

gzcat - utility for displaying contents of compressed files using Lempel–Ziv compression.

gzip - used for compression using Lempel–Ziv compression.

hash - finds and remembers the full pathname of the specified command.

help - Displays the help pages for Bash built‐in commands

history - displays the command history

if - executes set commands based on conditional expression.

jobs - lists the active jobs.

kill - sends a system signal to the specified process ID (PID).

killall - sends a system signal to a running process based on process name.

let - evaluates each argument in a mathematical expression.

less - allows you to view contents contents of a file in a paging style.

local - creates a limited‐scope variable in a function.

logout - exits a login shell.

link - creates a link to a file using an alias name. ln - creates a symbolic or hard link to a designated file. ls - lists directory contents and/or file information. lvcreate - creates a Logical Volume Manager (LVM) volume. lvdisplay - displays an LVM volume. lvextend - increases the size of an LVM volume. lvreduce - decreases the size of an LVM volume.

mapfile - reads STDIN lines and puts them into an indexed array. mandb - creates the database allowing man page keyword searches. man - displays the man pages for the designated command or topic. mkdir - creates the specified directory. mkfs - formats a partition with specified filesystem. mktemp - creates a temporary file or directory.

more - lists the contents of the specified file, pausing after each screen of data

mount - displays or mounts disk devices into the virtual filesystem.

mv - renames or move a file or directory nano - invokes the nano text editor. nice - runs a command using a different priority level on the system. nohup - executes designated command while ignoring SIGHUP signal.

passwd - changes the password for a specified user account.

popd - removes entries from the directory stack.

printf - displays text using formatted strings.

printenv - displays the value of the specified environment variable or displays the value of all the environment variables.

pushd - push a directory to the directory stack.

ps - displays information about the running processes on the system.

pwd - displays the pathname of the current working directory.

pvcreate - creates a physical LVM volume. pvdisplay - displays a physical LVM volume. renice - changes the priority of a running application on the system. rm - deletes the specified file or directory. rmdir - deletes the specified empty directory.

read - reads one line of data from STDIN , and assigns it to a variable.

Reads - STDIN lines, and puts them into an indexed array.

readonly - reads one line of data from STDIN , and assigns it to a variable that can't be changed.

return - forces a function to exit with a value that can be retrieved by the calling script.

select - displays list of words with numbers allowing selection.

set - sets and displays environment variable values and shell attributes.

shft - rotates positional parameters down one position.

shopt - toggles the values of variables controlling optional shell behavior.

source or . - reads and executes commands from a designated file in the current shell.

suspend - suspends the execution of the shell until a SIGCONT signal is received.

sed - streams line editing using editor commands. setterm - modifies terminal settings. sleep - pauses Bash shell operation for a specified amount of time. sort - organizes data in a data file based on the specified order. stat - views the file statistics of the specified file. sudo - runs an application as the root user account.

test - returns an exit status of 0 or 1 based on the specified condition.

time - displays the accumulated real, user, and system times executing command(s).

times - displays the accumulated user and system shell times.

trap - executes the specified command if the specified system signal is received.

true - sets a result to successful status.

type - displays how the specified word would be interpreted if used as a command.

typeset - declares a variable or variable type. tail - displays the last portion of the specified file's contents. tar - archives data and directories into a single file. tee - sends information to both STDOUT and STDIN. top - displays the active processes, showing vital system statistics. touch - creates a new empty file or updates the time stamp on an existing file.

useradd - creates a new system user account.

usermod - modifies an existing system user account.

userdel - removes an existing system user account.

ulimit - sets a limit on the specified resource for system users.

umask - sets default permissions for newly created files and directories.

umount - removes a mounted disk device from the virtual filesystem.

uptime - displays information on how long the system has been running.

unalias - removes the specified alias.

unset - removes the specified environment variable or shell attribute.

until - executes set commands until condition statement returns true.

vgchange - activates or deactivates an LVM volume group. vgcreate - creates an LVM volume group. vgdisplay - displays an LVM volume group. vgextend - increases the size of an LVM volume group. vgreduce - decreases the size of an LVM volume group. vgremove - Deletes an LVM volume group.

vi - invokes the vim text editor. vim - invokes the vim text editor. vmstat - produces a detailed report on memory and CPU usage on the system.

wait - waits for the specified process to complete, and returns the exit status.

while - executes set commands while condition statement returns true.

wc - displays text file statistics. whereis - displays a designated command's files, including binary, source code, and man pages.

which - finds the location of an executable file. who - displays users currently logged into system. whoami - displays the current user's username.

xargs - takes items from STDIN , builds commands, and executes the commands.

xterm - invokes the xterm terminal emulator.

zenity - creates window widgets for GNOME Shell. zip - unix version of the Windows PKZIP program.

Spotted a mistake or want something added? Send me a note.