ࡱ> pro5@  bjbj22 +XX@@@@@@@T|||8D<T7!@V"xxxxxx  $!R?$r @xxxxx @@xx x"@x@x x (@@x4 4#Te|"!07!$$TT@@@@$@8xxxxxxx TTX$tTTXLinux Command Reference v1.3By: Matthew Melucci There is no real order to this. Everything is case-sensitive as well so if there is a lower case or capital letter you must enter it exactly as I did. This is not a list of every command for Linux. These are only the ones I think will be useful to people using Linux for the first time. I will provide further comment on some of these functions (the ones with footnotes) towards the end of the document. In the examples where I use [.ext] I only mean that it is the file extension. It could be anything (e.g. [.exe], [.txt], [.out], [.jpg], [.cpp], [.gif], etc). FunctionSyntaxExampleDisplay Manual For Commandman man whoamiActive UserwhoamiwhoamiChange File Permissions1chmod chmod 755 myfile.extChange Passwordpasswd passwd smithUser Informationfinger finger smithChange Usersu su smithClear ScreenclearclearCopy Filescp cp myfile.ext /mydirectoryCreate Empty Filetouch touch mynewfile.extCreate an Alias For Commandalias = alias myname = whoamiDelete an Aliasunalias unalias mynameCompress .gz Filegzip -c > .gzgzip -c myfile.ext > myfile.ext.gzUncompress .gz Filegzip -d .gzgzip -d myfile.ext.gzPrint Commandlpr Pnetlaser -h lpr Pnetlaser -h myfile.extDate/TimedatedateDecompress .tar Filetar -xvf tar -xvf mytar.extDelete a Directoryrm -r rm -r /mydirectoryDelete Filerm rm myfile.extDetermine File Typefile file myfile.extFind Files (from your root directory only)find / -name find / -name myfile.extIdentify a Programwhatis whatis myprogramShow System Processesps -auxps -auxKill Process (use with caution)kill -9 (use ps -aux to find PID)kill -9 111List Files in DirectorylslsList Files and Hidden Files in Directoryls -als -aList Files and Show Permissionsls -lls -lCreate a Directorymkdir mkdir /mydirectoryList Mounted DevicesmountmountMount a Device (Example for floppy disc)2mount /dev/ mount /dev/fd01440 /tmpmUnmount a Deviceumount umount /tmpmShow Current DirectorypwdpwdRename a Filemv mv myfile.ext /mydirecotry/mynewfile.extReboot Computershutdown -r nowshutdown -r nowShutdown Computershutdown -h nowshutdown -h nowTalk to Other Userstalk talk smith 1. Understanding file permissions can be tricky to a first time user. Permissions tell you what you and other people can do to your directories and files. The numbers that you use to change the permissions represent 3 separate things: Read/Write/Execute. Each one of these has 3 things associated with it: User/Group/Everyone Else. Depending on the permissions set, it will tell the computer if you, the user, can Read/Write/Execute your files and directories, if people in your group can Read/Write/Execute your files and directories and if anyone else with an account can Read/Write/Execute your files and directories. Each one of the 3 numbers (e.g. chmod 755) represents the permissions on that file or directory. Therefore, 7 represents you, the user. The first 5 is for users in the group that you are in and the second 5 is for everyone else that has an account. Now, in order to understand how this works, you must understand binary or at least understand the binary representation for the numbers 0 7. If youre already familiar with binary, which I will not explain here, then you know that the binary equivalent for 7 is 111. The binary equivalent for 5 is 101. A 1 represents a yes and a 0 represents a no in this case. So for the permissions 755 we have 111/101/101 which says that for 7, which represents you the user, you can Read/Write/Execute your own files and directories. It also tells us for the first 5, which represents other users in your group, that they can Read/Execute your files but not Write. For the second 5, which represents all other users with accounts, they can Read/Execute your files but not modify or change them (a.k.a. Write) just like the first 5. By learning the binary equivalents of each number 0 7, you can set different permissions (e.g. chmod 630) on your files and directories. You can set different permissions for each file and directory or you can simply add a -R onto your command to recursively set the same permissions through the entire directory (e.g. chmod -R 755 /mydirectory). The options are limitless. 2. Mounting devices are quite simple. Since you will often mount a floppy disc, I used that as an example. Please note that I mounted the floppy disc to /tmpm. If you plan on using that directory, you must first create it. If the directory does not exist the command wont work. The directory /tmpm is just an arbitrary name that stands for temporary mount. I simply made it up, nothing tricky at all. As a final comment, there are lots of extra options that can be added to certain commands (e.g. -aux). For the list files command (ls), you can add -a for showing hidden files and directories or add a -l to show file permissions. Amazing as it may seem, you can even use both at the same time, but keep in mind you only need one dash (e.g. ls -al). For the delete directory command, (rm) you add -r so it will recursively delete every directory and file within the directory you are deleting. You can also use more than one of these options at a time. Remember that these are all case-sensitive so using a -r and using a -R may not be the same thing in some cases. These options vary for each command and there are too many for me to even attempt to list in this small reference file for beginners. If youre interested in learning all the Linux commands and options, then I would advise you to visit the Linux website ( HYPERLINK "http://www.linux.org" www.linux.org) and look through its documentation. If youre interested in learning more about certain commands, dont forget to use the man command to bring up a manual on the command, which will also list all the options available with that specific command and what it can do. PAGE  PAGE 2 1234Ucghq 7 W x y Ⱦ籧睙|t|p|pleplppp h#LHh#LHhZih#LHhh5hhkhO h"B*5hha5hahhB*Tphh h 5>*hh B*Tphh5B*Tphh>h!B*Tphh!h hTh 79h 5>*CJ`aJ`hTh 5>*CJ`aJ`'234q r { $$Ifa$gd2gd Qkd$$Ifl0P 3 t644 la $$Ifa$gd $If    1 2 6 7 9 : ; ? @ B C G H J K O P R S W X Y Z [ _ ` b c g h i n o p q r z { ƽƹƵƹƹhA h2h2 h?79hZCh h?h2h2>*CJ$aJ$ h279hTh2>*CJ$aJ$ hT79 hhh,Eh#LH h>*hra hGh; qeeY $$Ifa$gdA $$Ifa$gd2kd$$IflF! 3P( t06    44 la qeeY $$Ifa$gdA $$Ifa$gd2kd$$IflF! 3P( t06    44 la qeeY $$Ifa$gdA $$Ifa$gd2kdo$$IflF! 3P( t06    44 la ! qeee $$Ifa$gd2kd$$IflF! 3P( t06    44 la  " 1 2 C D P R b c t u     ' ( ; = X Y i s t   - . 3 4 C D I J Y [ h i hih+y$ ha79hf'hphahyh2hA h279h-%h-%H*O! " 2 D Q qeee $$Ifa$gd2kdY$$IflF! 3P( t06    44 laQ R c u qeee $$Ifa$gd2kd$$IflF! 3P( t06    44 la qeee $$Ifa$gd2kdC$$IflF! 3P( t06    44 la qeeY $$Ifa$gda $$Ifa$gd2kd$$IflF! 3P( t06    44 la  qeee $$Ifa$gd2kd-$$IflF! 3P( t06    44 la   ( < qeee $$Ifa$gd2kd$$IflF! 3P( t06    44 la< = Y t qeee $$Ifa$gd2kd$$IflF! 3P( t06    44 la qeee $$Ifa$gd2kd$$IflF! 3P( t06    44 la  qeee $$Ifa$gd2kd$$IflF! 3P( t06    44 la  . D Z qeee $$Ifa$gd2kdv$$IflF! 3P( t06    44 laZ [ i qeee $$Ifa$gdikd$$IflF! 3P( t06    44 lai x y    +,-89FGTUVijyz !GHghmn~ h79 hZi79hh^(>hZihp h279h2h+y$hiQ qeYY $$Ifa$gdp $$Ifa$gdikd`$$IflF! 3P( t06    44 la qeYY $$Ifa$gdp $$Ifa$gdikd$$IflF! 3P( t06    44 la ,qeYY $$Ifa$gdp $$Ifa$gdikdJ$$IflF! 3P( t06    44 la,-9GUqeYY $$Ifa$gdp $$Ifa$gdikd$$IflF! 3P( t06    44 laUVjzqeYY $$Ifa$gdp $$Ifa$gdikd4 $$IflF! 3P( t06    44 laqeYY $$Ifa$gdp $$Ifa$gdikd $$IflF! 3P( t06    44 la qeYY $$Ifa$gdp $$Ifa$gdikd $$IflF! 3P( t06    44 la !7?GqeYY $$Ifa$gdp $$Ifa$gdikd $$IflF! 3P( t06    44 laGHhqeYY $$Ifa$gdp $$Ifa$gdikd $$IflF! 3P( t06    44 laqeYY $$Ifa$gdp $$Ifa$gdikd} $$IflF! 3P( t06    44 la[\pqvw|}~  ./23678EF_`ÿÿÿÿø h-%79h+y$h-%hlhh-%h-%H*h> hK79hK h!79h! hZi79hZih#6GqeYY $$Ifa$gdp $$Ifa$gdikd $$IflF! 3P( t06    44 laqeYY $$Ifa$gdp $$Ifa$gdikdg $$IflF! 3P( t06    44 la2H[qeYY $$Ifa$gdp $$Ifa$gdikd $$IflF! 3P( t06    44 la[\qw}qeYY $$Ifa$gdp $$Ifa$gd>kdQ $$IflF! 3P( t06    44 la}~qeYY $$Ifa$gdp $$Ifa$gdikd $$IflF! 3P( t06    44 la qeYY $$Ifa$gdp $$Ifa$gdikd;$$IflF! 3P( t06    44 la/37qeYY $$Ifa$gdp $$Ifa$gdikd$$IflF! 3P( t06    44 la78F`qeYY $$Ifa$gdp $$Ifa$gdikd%$$IflF! 3P( t06    44 laqeYY $$Ifa$gdp $$Ifa$gdikd$$IflF! 3P( t06    44 laqeYY $$Ifa$gdp $$Ifa$gdikd$$IflF! 3P( t06    44 laqeYY $$Ifa$gdp $$Ifa$gdikd$$IflF! 3P( t06    44 la !"0 01SUij $*:uy (CHO\b PXԼԼܴܴܴܴܴܰԬԬԤԤh^1(h^1(5h]lh Rhh4ghra hyh^1(5h7nhiRhyhy5h^1(hyh0h. h.H*hh.H*h} ! h79h@ MN qhhhhhh_S &`#$gdZC  gd!  gd2kd$$IflF! 3P( t06    44 la :DEcd-356ef-0Z0LNPYb.iyz{<=SVYvw ÿ˿˿˻˻໷˷h zh?h!hhkEph3h oh. h.H*h!hra hLh hyh0h Rhh4gh^1(H #CD_`e+ , < E t u ๲ਢh]lh]l0JmHnHu h30Jjh30JU h Rh! hkEphZChZChHRh?0Jjnh?Ujh?Uh3h+h?h hra 5h"B*hra h z2   gd! &`#$gdZCh]hgd!)1h0:p= /!"#$%$$If!vh55#v:Vl t06,5s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(s$$If!vh55P5(#v#vP#v(:Vl t655P5(DyK www.linux.orgyK ,http://www.linux.org/@@@ NormalCJ_HaJmH sH tH DA@D Default Paragraph FontVi@V  Table Normal :V 44 la (k(No List j@j 2 Table Grid7:V04@4 !Header  !.)@. ! Page Number6U@!6 ? Hyperlink >*B*ph234qr{ !"2DQRcu(<=Yt.DZ[i ,-9GUVjz !7?GHh2H[\qw}~   / 3 7 8 F `     MN0 0 0 000p0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 000p000@0@0@0@0@0@0w  i   %0<>? ! Q  <  Z ,U G[}7  !"#$&'()*+,-./123456789:;=@ X !!33:=YD[H~% . `  melucciScoobyHG Y7Q. ? pL-%ra !} !+y$)&WK'{'^1("B*>^(>ZC#LHK65QMSUfh4gZi okEp}$s:Bv z+y35,E>njB R?!?i0A7nlk2,{2*#6OkGaf'iR]lT!23r{ !"2DQRcu(<=Yt.DZ[i ,-9GUVjz !7?GHh2H[\qw}~   / 3 7 8 F `     @T@@UnknownGz Times New Roman5Symbol3& z Arial"qhB]E=  -  -!24d 3H)?TLinux Command ReferencemelucciScoobyOh+'0x  4 @ LX`hpLinux Command ReferenceinumeluccielueluNormalScooby61oMicrosoft Word 10.0@'@42d@QTe ՜.+,D՜.+,T hp  Widener University- A Linux Command Reference Title 8@ _PID_HLINKSAdYhttp://www.linux.org/  !"#$%&'()*+,-./0123456789:;<=>?@ACDEFGHIJKMNOPQRSTUVWXYZ[\]^`abcdefhijklmnqRoot Entry FPE#TesData B+1TableL$WordDocument+SummaryInformation(_DocumentSummaryInformation8gCompObjj  FMicrosoft Word Document MSWordDocWord.Document.89q