pwd present working directory. where you're "at" cd dirname change present working directory to dirname cd change to home directory cd - change to previous directory ls directory listing ls -l long listing gives more info about files ls -a show "dot" files, those that start with . cat fn display file 'fn' Output can be paused with ^S, resumed with ^Q (on a slow terminal, or fumbled fingers) -n line numbers more fn display file 'fn' a page at a time. Also: pg and less, head and tail lpr fn print file (or lp). to default printer. image and Postscript too. rm fn delete fn. No recycle trash can. rm f1 f2 delete f1 and f2 cp oldf newf make a copy of oldf as newf cp f1 f2 f3 dirname copy f1, f2 and f3 to directory dirname cp f1 . copy file to this directory mv oldf targetf move/rename oldf as targetf mv oldf dir move file into another directory mv dir1 dir2 rename directory or move directory to be a subdirectory of another mkdir dirname make a directory rmdir dirname delete a directory (must be empty first) wc fn number of chars (bytes), "words", lines in fn -L longest line sort fn sort fn grep word fn search for word in fn od -c fn display ASCII chars of fn file fn what kind of file, e.g. C source code, executable file, text file, shell script... locate string show all files in system that have string as part of name find -name fn search for file(s) in disk tree who who is logged on, on which terminals, doing what... ps what processes you have running in this shell. Also, others' processes -e or -u user ps ux all your processes in system, including x not associated with this shell ps aux all processes in system kill pid terminate a process diff f1 f2 differences between f1 and f2 mail send/receive mail: Also mailx, elm, pine, mutt, GUI mailers etc. vi text editor emacs text editor. Other editors: joe, jed, pico, xedit, kedit, gedit, kate (source code aware), kwrite Word processors: kword, abiword, wordperfect, openoffice writer mdir a: mtools to access FAT diskette mcopy -t fil1 a: copy file to floppy mcopy -t a:fil2 copy from floppy gcc prog1.c C compiler. executable in a.out g++ prog1.cpp C++ compiler javac Hello.java Java compiler java Hello JVM php, perl, awk, python, ruby, f77 compilers/interpreters File manager/browser: mc, nautilus, konqueror
$ apropos string # search all the synopses for cmds with the string
$ whatis word
Unix Programmer's Manual (about 6 feet wide) had descriptions of how to use the utilities.
-h or --help option
bash help on its built-in commands
GNU info documentation on utilities /usr/info
HOWTOs and FAQs: /usr/share/doc
Linux Documentation Project: linuxdoc.org
comp.os.Linux newsgroup
www.ssc.com/lg Linux Journal
Linux Magazine
Major utilities and distros have their own web sites: samba, apache, gimp, perl,
sendmail, xfree86, gnu, gnome, kde, openoffice, applix, etc.
sourceforge.net has tons of the smaller open source projects.
Linux related web sites: end with .com or .org:
starting with "linux" or "li":
today mall links base now central app -center world
***************************************
Commands.
"Command" could be: program file (machine language compiled or a script), shell built-in command (statement), shell function, alias (whence -v or type to distinguish).
which cmdname to see if in system (actually, if in path)
whereis cmd tells where it and its man page is.
command format:
Consist of sequence of 'words' separated by white space (blanks and tabs).
A command can be one word: e.g.
date who lsA command can be more than one word. The second and all other words are arguments to the command: e.g.
ls -l cp fromfile tofile grep word filename who am i nxterm -geometry 85x30+0+0 -fn 9x15bold -fg white -bg black -cr red &
ls -l ls -t ls -l -t ls -lt
lpr -Pprinter4 fn
rm -i interactively delete grep -i ignore case in search