You are on page 1of 5

An A-Z Index of the Bash command line for Linux.

alias Create an alias apropos Search 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 ind and !eplace te"t# database sort/$alidate/inde" b basename Strip director% and suffi" from filenames bash &'U (ourne-)gain SHell bc )rbitrar% precision calculator language bg Send to background break *"it from a loop builtin !un a shell builtin b+ip, Compress or decompress named file(s) c cal Displa% a calendar case Conditionall% perform a command cat Concatenate and print (displa%) the content of files cd Change Director% cfdisk -artition table manipulator for .inu" chgrp Change group ownership chmod Change access permissions chown Change file owner and group chroot !un a command with a different root director% chkconfig S%stem ser$ices (runle$el) cksum -rint C!C checksum and b%te counts clear Clear terminal screen cmp Compare two files comm Compare two sorted files line b% line command !un a command - ignoring shell functions continue !esume the ne"t iteration of a loop cp Cop% one or more files to another location cron Daemon to e"ecute scheduled commands crontab Schedule a command to run at a later time csplit Split a file into conte"t-determined pieces cut Di$ide a file into se$eral parts d date Displa% or change the date / time dc Desk Calculator dd Con$ert and cop% a file# write disk headers# boot records ddrescue Data reco$er% tool declare Declare $ariables and gi$e them attributes df Displa% free disk space diff Displa% the differences between two files diff0 Show differences among three files dig D'S lookup dir (riefl% list director% contents dircolors Colour setup for 1ls2 dirname Con$ert a full pathname to 3ust a path dirs Displa% list of remembered directories dmesg -rint kernel / dri$er messages du *stimate file space usage e echo Displa% message on screen

egrep Search file(s) for lines that match an e"tended e"pression e3ect *3ect remo$able media enable *nable and disable builtin shell commands en$ *n$ironment $ariables ethtool *thernet card settings e$al *$aluate se$eral commands/arguments e"ec *"ecute a command e"it *"it the shell e"pect )utomate arbitrar% applications accessed o$er a terminal e"pand Con$ert tabs to spaces e"port Set an en$ironment $ariable e"pr *$aluate e"pressions f false Do nothing# unsuccessfull% fdformat .ow-le$el format a flopp% disk fdisk -artition table manipulator for .inu" fg Send 3ob to foreground fgrep Search file(s) for lines that match a fi"ed string file Determine file t%pe find Search for files that meet a desired criteria fmt !eformat paragraph te"t fold 4rap te"t to fit a specified width5 for *"pand words# and e"ecute commands format ormat disks or tapes free Displa% memor% usage fsck ile s%stem consistenc% check and repair ftp ile 6ransfer -rotocol function Define unction 7acros fuser 8dentif%/kill the process that is accessing a file g gawk ind and !eplace te"t within file(s) getopts -arse positional parameters grep Search file(s) for lines that match a gi$en pattern groupadd )dd a user securit% group groupdel Delete a group groupmod 7odif% a group groups -rint group names a user is in g+ip Compress or decompress named file(s) h hash !emember the full pathname of a name argument head 9utput the first part of file(s) help Displa% help for a built-in command histor% Command Histor% hostname -rint or set s%stem name i icon$ Con$ert the character set of a file id -rint user and group id2s if Conditionall% perform a command ifconfig Configure a network interface ifdown Stop a network interface ifup Start a network interface up import Capture an : ser$er screen and sa$e the image to file install Cop% files and set attributes 3 3obs .ist acti$e 3obs

3oin k

;oin lines on a common field

kill Stop a process from running killall <ill processes b% name l less Displa% output one screen at a time let -erform arithmetic on shell $ariables ln Create a s%mbolic link to a file local Create $ariables locate ind files logname -rint current login name logout *"it a login shell look Displa% lines beginning with a gi$en string lpc .ine printer control program lpr 9ff line print lprint -rint a file lprintd )bort a print 3ob lprint= .ist the print =ueue lprm !emo$e 3obs from the print =ueue ls .ist information about file(s) lsof .ist open files m make !ecompile a group of programs man Help manual mkdir Create new folder(s) mkfifo 7ake 8 9s (named pipes) mkisofs Create an h%brid 8S9>??@/;9.8*6/H S files%stem mknod 7ake block or character special files more Displa% output one screen at a time mount 7ount a file s%stem mtools 7anipulate 7S-D9S files mtr 'etwork diagnostics (traceroute/ping) m$ 7o$e or rename files or directories mm$ 7ass 7o$e and rename (files) n netstat 'etworking information nice Set the priorit% of a command or 3ob nl 'umber lines and write files nohup !un a command immune to hangups notif%-send Send desktop notifications nslookup Auer% 8nternet name ser$ers interacti$el% o open 9pen a file in its default application op 9perator access p passwd 7odif% a user password paste 7erge lines of files pathchk Check file name portabilit% ping 6est a network connection pkill Stop processes from running popd !estore the pre$ious $alue of the current director% pr -repare files for printing printcap -rinter capabilit% database printen$ -rint en$ironment $ariables printf ormat and print data

ps -rocess status pushd Sa$e and then change the current director% pwd -rint 4orking Director% = =uota Displa% disk usage and limits =uotacheck Scan a file s%stem for disk usage =uotactl Set disk =uotas r ram ram disk de$ice rcp Cop% files between two machines read !ead a line from standard input readarra% !ead from stdin into an arra% $ariable readonl% 7ark $ariables/functions as readonl% reboot !eboot the s%stem rename !ename files renice )lter priorit% of running processes rems%nc S%nchroni+e remote files $ia email return *"it a shell function re$ !e$erse lines of a file rm !emo$e files rmdir !emo$e folder(s) rs%nc !emote file cop% (S%nchroni+e file trees) s screen 7ultiple" terminal# run remote shells $ia ssh scp Secure cop% (remote file cop%) sdiff 7erge two files interacti$el% sed Stream *ditor select )ccept ke%board input se= -rint numeric se=uences set 7anipulate shell $ariables and functions sftp Secure ile 6ransfer -rogram shift Shift positional parameters shopt Shell 9ptions shutdown Shutdown or restart linu" sleep Dela% for a specified time slocate ind files sort Sort te"t files source !un commands from a file 252 split Split a file into fi"ed-si+e pieces ssh Secure Shell client (remote login program) strace 6race s%stem calls and signals su Substitute user identit% sudo *"ecute a command as another user sum -rint a checksum for a file suspend Suspend e"ecution of this shell s%mlink 7ake a new name for a file s%nc S%nchroni+e data on disk with memor% t tail 9utput the last part of file tar 6ape )!chi$er tee !edirect output to multiple files test *$aluate a conditional e"pression time 7easure -rogram running time timeout !un a command with a time limit times User and s%stem times

touch Change file timestamps top .ist processes running on the s%stem traceroute 6race !oute to Host trap !un a command when a signal is set(bourne) tr 6ranslate# s=uee+e# and/or delete characters true Do nothing# successfull% tsort 6opological sort tt% -rint filename of terminal on stdin t%pe Describe a command u ulimit .imit user resources umask Users file creation mask umount Unmount a de$ice unalias !emo$e an alias uname -rint s%stem information une"pand Con$ert spaces to tabs uni= Uni=uif% files units Con$ert units from one scale to another unset !emo$e $ariable or function names unshar Unpack shell archi$e scripts until *"ecute commands (until error) uptime Show uptime useradd Create new user account userdel Delete a user account usermod 7odif% user account users .ist users currentl% logged in uuencode *ncode a binar% file uudecode Decode a file created b% uuencode $ $ Berbosel% list director% contents (1ls -l -b2) $dir Berbosel% list director% contents (1ls -l -b2) $i 6e"t *ditor $mstat !eport $irtual memor% statistics w wait 4ait for a process to complete watch *"ecute/displa% a program periodicall% wc -rint b%te# word# and line counts whereis Search the user2s Cpath# man pages and source files for a program which Search the user2s Cpath for a program file while *"ecute commands who -rint all usernames currentl% logged in whoami -rint the current user id and name (1id -un2) wget !etrie$e web pages or files $ia H66-# H66-S or 6write Send a message to another user " "args *"ecute utilit%# passing constructed argument list(s) "dg-open 9pen a file or U!. in the user2s preferred application5 %es -rint a string until interrupted 5 !un a command script in the current shell DD !un the last command again EEE Comment / !emark Commands marked are bash built-ins# these are a$ailable under all shells5

You might also like