Almost all of the Linux commands below will function the same way in the bash shell that is used by your OS X ''Terminal.app'' ====== Most Frequently Used Linux Commands ====== To get detailed help of these command, including the options available and how to use them, use man command_name or help command_name ==== manipulating files/directories ==== *** [[http://www.linuxcommand.org/man_pages/cd1.html|cd]] ** - change the current directory *** [[http://www.linuxcommand.org/man_pages/ls1.html|ls]] ** - list directory contents *** [[http://www.linuxcommand.org/man_pages/mkdir1.html|mkdir]] ** - make directories *** [[http://www.linuxcommand.org/man_pages/mv1.html|mv]] ** - move (rename) files/directories *** [[http://www.linuxcommand.org/man_pages/rm1.html|rm]] ** - remove files/directories *** [[http://www.linuxcommand.org/man_pages/cp1.html|cp]] ** - copy files/directories *** [[http://www.linuxcommand.org/man_pages/touch1.html|touch]] ** - change file timestamps. *** [[http://www.linuxcommand.org/man_pages/chmod1.html|chmod]] ** - change file access permissions *** [[http://www.linuxcommand.org/man_pages/rsync1.html|rsync]] ** - faster, flexible replacement for rcp (remote file copy) *** [[http://www.linuxcommand.org/man_pages/scp1.html|scp]] ** - secure copy (remote file copy program) ==== working with text files ==== *** [[http://www.linuxcommand.org/man_pages/cat1.html|cat]] ** - concatenate files and print on the standard output *** [[http://www.linuxcommand.org/man_pages/head1.html|head]] ** - output the first part of files *** [[http://www.linuxcommand.org/man_pages/tail1.html|tail]] ** - output the last part of files *** [[http://www.linuxcommand.org/man_pages/wc1.html|wc]] ** - print the number of newlines, words, and bytes in files *** [[http://www.linuxcommand.org/man_pages/more1.html|more]] ** - a filter for paging through text one screenful at a time *** [[http://www.linuxcommand.org/man_pages/less1.html|less]] ** - a program similar to more, but more powerful (and user friendly) *** [[http://www.linuxcommand.org/man_pages/grep1.html|grep]] ** - print lines matching a pattern *** [[http://www.linuxcommand.org/man_pages/diff1.html|diff]] ** - find differences between two files *** [[http://www.linuxcommand.org/man_pages/gvim1.html|gvim]] (vi) ** - The GUI version of vim - a text editor that is upwards compatible to Vi. *** [[http://www.linuxcommand.org/man_pages/sed1.html|sed]] ** - a stream editor used to perform basic text transformations *** [[http://www.linuxcommand.org/man_pages/awk1.html|awk]] ** - pattern scanning and processing language ==== working with processes ==== *** [[http://www.linuxcommand.org/man_pages/ps1.html|ps]] ** - report a snapshot of the current processes *** [[http://www.linuxcommand.org/man_pages/top1.html|top]] ** - display Linux tasks *** [[http://www.linuxcommand.org/man_pages/bg1.html|bg]] ** - resume the suspended job in the background, as if it had been started with & (useful after you suspend a command with Ctrl-z) *** [[http://www.linuxcommand.org/man_pages/kill1.html|kill]] ** - terminate a process *** [[http://www.linuxcommand.org/man_pages/exit1.html|exit]] ** - cause the shell to exit ==== getting useful information ==== *** [[http://www.linuxcommand.org/man_pages/man1.html|man]] ** - format and display the manual pages *** [[http://www.linuxcommand.org/man_pages/help1.html|help]] ** - display helpful information about builtin commands *** [[http://www.linuxcommand.org/man_pages/date1.html|date]] ** - print or set the system date and time *** [[http://www.linuxcommand.org/man_pages/locate1.html|locate]] ** - find files by name *** [[http://www.linuxcommand.org/man_pages/find1.html|find]] ** - search for files in a directory hierarchy *** [[http://www.linuxcommand.org/man_pages/who1.html|who]] ** - show who is logged on *** [[http://www.linuxcommand.org/man_pages/pwd1.html|pwd]] ** - print name of current/working directory *** [[http://www.linuxcommand.org/man_pages/du1.html|du]] ** - estimate file space usage *** [[http://www.linuxcommand.org/man_pages/df1.html|df]] ** - report filesystem disk space usage *** [[http://www.linuxcommand.org/man_pages/which1.html|which]] ** - shows the full path of (shell) commands *** [[http://www.linuxcommand.org/man_pages/history1.html|history]] ** - display the command history list with line numbers ==== others ==== *** [[http://www.linuxcommand.org/man_pages/echo1.html|echo]] ** - display a line of text *** [[http://www.linuxcommand.org/man_pages/source1.html|source]] ** - read and execute commands from a file *** [[http://www.linuxcommand.org/man_pages/alias1.html|alias]] ** - prints the list of aliases or define new aliases *** [[http://www.linuxcommand.org/man_pages/gimp1.html|gimp]] ** - an image manipulation and paint program *** [[http://www.linuxcommand.org/man_pages/ssh1.html|ssh]] ** - a program for logging into a remote machine and for executing commands on a remote machine *** [[http://www.linuxcommand.org/man_pages/mount8.html|mount/umount]] ** - mount and unmount filesystems *** [[http://www.linuxcommand.org/man_pages/passwd1.html|passwd]] ** - update a user's authentication tokens (password) *** [[http://www.linuxcommand.org/man_pages/nohup1.html|nohup]] ** - run a command immune to hangups, with output to a non-tty *** [[http://www.linuxcommand.org/man_pages/rdesktop1.html|rdesktop]] ** - Remote Desktop Protocol client (connects to windows computers) *** [[http://www.linuxcommand.org/man_pages/export1.html|export]] ** - export supplied names (variables) to the environment of subsequently executed commands *** [[http://www.linuxcommand.org/man_pages/crontab1.html|crontab]] ** - maintain crontab files for individual users (used to execute commands at scheduled time)