Linux Commands
Linux Commands
h Help manual pages (man -k) apt-get Search for and install software packages (Debian/Ubuntu) aptitude Search for and install software packages (Debian/Ubuntu) aspell Spell Checker awk b basename Strip directory and suffix from filenames bash bc bg GNU Bourne-Again SHell Arbitrary precision calculator language Send to background Find and Replace text, database sort/validate/index
break Exit from a loop builtin Run a shell builtin bzip2 Compress or decompress named file(s) c cal case cat cd Display a calendar Conditionally perform a command Concatenate and print (display) the content of files Change Directory
cfdisk Partition table manipulator for Linux chgrp Change group ownership
chmod Change access permissions chown Change file owner and group chroot Run a command with a different root directory chkconfig System services (runlevel) cksum Print CRC checksum and byte counts clear Clear terminal screen cmp comm Compare two files Compare two sorted files line by line
command Run a command - ignoring shell functions continue Resume the next iteration of a loop cp cron Copy one or more files to another location Daemon to execute scheduled commands
crontab Schedule a command to run at a later time csplit Split a file into context-determined pieces cut d date dc dd Display or change the date & time Desk Calculator Convert and copy a file, write disk headers, boot records Divide a file into several parts
ddrescue Data recovery tool declare Declare variables and give them attributes df diff Display free disk space Display the differences between two files
diff3 Show differences among three files dig dir DNS lookup Briefly list directory contents
dircolors Colour setup for `ls' dirname Convert a full pathname to just a path dirs Display list of remembered directories
dmesg Print kernel & driver messages du e echo Display message on screen Estimate file space usage
egrep Search file(s) for lines that match an extended expression eject Eject removable media enable Enable and disable builtin shell commands env Environment variables
ethtool Ethernet card settings eval exec exit Evaluate several commands/arguments Execute a command Exit the shell
expect Automate arbitrary applications accessed over a terminal expand Convert tabs to spaces export Set an environment variable expr f Evaluate expressions
false Do nothing, unsuccessfully fdformat Low-level format a floppy disk fdisk Partition table manipulator for Linux fg Send job to foreground
fgrep Search file(s) for lines that match a fixed string file find fmt fold for Determine file type Search for files that meet a desired criteria Reformat paragraph text Wrap text to fit a specified width. Expand words, and execute commands
format Format disks or tapes free fsck ftp Display memory usage File system consistency check and repair File Transfer Protocol
function Define Function Macros fuser Identify/kill the process that is accessing a file g gawk Find and Replace text within file(s)
getopts Parse positional parameters grep Search file(s) for lines that match a given pattern
groups Print group names a user is in gzip h Compress or decompress named file(s)
Remember the full pathname of a name argument Output the first part of file(s) Display help for a built-in command
history Command History hostname Print or set system name i iconv Convert the character set of a file id if Print user and group id's Conditionally perform a command
ifconfig Configure a network interface ifdown Stop a network interface ifup Start a network interface up
import Capture an X server screen and save the image to file install Copy files and set attributes j jobs join k kill Stop a process from running List active jobs Join lines on a common field
killall Kill processes by name l less let Display output one screen at a time Perform arithmetic on shell variables
ln
local Create variables locate Find files logname Print current login name logout Exit a login shell look lpc lpr Display lines beginning with a given string Line printer control program Off line print
lprint Print a file lprintd Abort a print job lprintq List the print queue lprm ls lsof m make man Recompile a group of programs Help manual Remove jobs from the print queue List information about file(s) List open files
mkdir Create new folder(s) mkfifo Make FIFOs (named pipes) mkisofs Create an hybrid ISO9660/JOLIET/HFS filesystem mknod Make block or character special files more Display output one screen at a time
mtools Manipulate MS-DOS files mtr mv mmv n netstat Networking information nice nl Set the priority of a command or job Number lines and write files Network diagnostics (traceroute/ping) Move or rename files or directories Mass Move and rename (files)
nohup Run a command immune to hangups notify-send Send desktop notifications nslookup Query Internet name servers interactively o open op p passwd Modify a user password paste Merge lines of files pathchk Check file name portability ping Test a network connection Open a file in its default application Operator access
pkill Stop processes from running popd pr Restore the previous value of the current directory Prepare files for printing
printenv Print environment variables printf Format and print data ps Process status
pushd Save and then change the current directory pwd q quota Display disk usage and limits quotacheck Scan a file system for disk usage quotactl Set disk quotas r ram rcp read ram disk device Copy files between two machines Read a line from standard input Print Working Directory
readarray Read from stdin into an array variable readonly Mark variables/functions as readonly reboot Reboot the system rename Rename files renice Alter priority of running processes remsync Synchronize remote files via email return Exit a shell function rev rm Reverse lines of a file Remove files
rsync Remote file copy (Synchronize file trees) s screen Multiplex terminal, run remote shells via ssh scp Secure copy (remote file copy)
select Accept keyboard input seq set sftp Print numeric sequences Manipulate shell variables and functions Secure File Transfer Program
shift Shift positional parameters shopt Shell Options shutdown Shutdown or restart linux sleep Delay for a specified time slocate Find files sort Sort text files
source Run commands from a file `.' split Split a file into fixed-size pieces ssh Secure Shell client (remote login program)
strace Trace system calls and signals su sudo sum Substitute user identity Execute a command as another user Print a checksum for a file
suspend Suspend execution of this shell symlink Make a new name for a file sync t tail tar tee test time Output the last part of files Tape ARchiver Redirect output to multiple files Evaluate a conditional expression Measure Program running time Synchronize data on disk with memory
times User and system times touch Change file timestamps top List processes running on the system
traceroute Trace Route to Host trap tr true Run a command when a signal is set(bourne) Translate, squeeze, and/or delete characters Do nothing, successfully
tsort Topological sort tty type u ulimit Limit user resources umask Users file creation mask umount Unmount a device Print filename of terminal on stdin Describe a command
unalias Remove an alias uname Print system information unexpand Convert spaces to tabs uniq Uniquify files
units Convert units from one scale to another unset Remove variable or function names unshar Unpack shell archive scripts until Execute commands (until error) useradd Create new user account usermod Modify user account users List users currently logged in uuencode Encode a binary file uudecode Decode a file created by uuencode v v vdir vi Verbosely list directory contents (`ls -l -b') Verbosely list directory contents (`ls -l -b') Text Editor
vmstat Report virtual memory statistics w watch Execute/display a program periodically wc Print byte, word, and line counts
whereis Search the user's $path, man pages and source files for a program which Search the user's $path for a program file
whoami Print the current user id and name (`id -un') Wget Retrieve web pages or files via HTTP, HTTPS or FTP
write Send a message to another user x xargs Execute utility, passing constructed argument list(s) xdg-open Open a file or URL in the user's preferred application. yes . !! ### Print a string until interrupted Run a command script in the current shell Run the last command again Comment / Remark
Commands marked are bash built-ins, these are available under all shells.