Back to DFS's C Page


Linux Cheat Sheet

Follow these fast links:

Logging In
Steps What to Do
Step 1 Boot the Computer
Step 2 Tap the SHIFT key when LILO appears
(A 5-second delay is built in.)
Step 3 Type the word linux
Step 4 Login: YourID
Step 5 Password: YourPassword
Step 6 $ startx -- -bpp 16

Back to Top

Logging Out
Steps What to Do
Step 1 Hold down CTRL & ALT and tap BACKSPACE
Step 2 $ exit
Step 3 Hold down CTRL & ALT and tap DELETE
Step 4 When the screen goes blank, turn off the machine.

Back to Top

Floppy Saving & Importing
mdir View Directory of Floppy
mcopy filename a: Copy from current dir to floppy
mcopy a:filename . Copy from floppy to current dir

Back to Top

Linux File System
LiSt filenames ls
  hidden files ls -a
  file permissions ls -l
CoPy file cp srcname dstname
CoPy file to directory cp filename dirname
Rename (MoVe) mv oldname newname
MoVe to Dir mv filename dirname
ReMove (delete) file rm filename
Change to Home Dir cd
Move Up a Dir cd ..
Move Down into a Dir cd dirname
MaKe new DIR mkdir dirname
ReMove DIR rmdir dirname
Print Working Dir pwd
Find File find Dir -name filename
N.B. Linux has path and filename completion when the name typed so far is unique. Tap the TAB key to complete. If the computer beeps, tap TAB twice to see the list of possible completions.

Back to Top

File Viewers
less filename More versatile than more
SPACE -- Screen Forward; B -- Screen Back; ENTER -- Line Forward; Q -- Quit; Exits at EOF
more filename Classic file lister
SPACE or F -- Screen Forward; B -- Screen Back; ENTER -- Line Forward; Q -- Quit; Does NOT Exit at EOF
cat filename Writes whole file to screen
head [-n5] filename Writes beginning of file to screen
Default is the first 10 lines
tail [-n5] filename Writes end of file to screen
Default is the last 10 lines

Back to Top

Text Editors
joe Editor like WordStar
vi The classic Unix line editor

Back to Top

Printing
Print file lpr filename
View printer queue lpq
Remove job #jn lprm jn // From lpq

Back to Top

Programming Languages
Assembler as
GNU C gcc
GNU C++ g++
GNU Debugger gdb
Java java, javac, appletviewer
perl perl

Back to Top

Online Documentation
man progname Original standard version
Uses more; Q to Quit
man -k keyword Use man to search for keyword
xman X Window version


© DFStermole 1998