Your Ad Here
About
Community
Art
Carnality
Entertainment
Science
Society
Technology
Hack
Phreak
Broadcast Technology
Computer Technology
Cryptography
Telecommunications
The Internet
Viruses
bbs | search | rss | faq | about | register
digg | del.icio.us | sphere | google

Linux Cheatsheet

by Aeon

Linux Cheatsheet

Basic commands

• cat: Dump the contents of a file to the screen. eg: 'cat ./foo'
• cd Change to another directory. eg: 'cd /bin'
• chmod Change a file's permissions. eg: 'chmod +r ./foo'
• chown Change a file's owner/group. eg: 'chown philipl.users ./foo'
• cp Copy a file to a new name/location. eg: 'cp ./foo /tmp/bar'
• grep Look for text in files. eg: grep "He's dead jim" *.txt"
• gzip/gunzip Compress/Uncompress a file. eg: "gzip foo"
• head/tail Dump the first/last few lines of a file. eg: 'tail ./foo'
• locate Find files by name. eg: 'locate ssh'
• ls Display the contents of a directory. eg: 'ls /bin'
• mkdir Make a directory. eg: 'mkdir bar'
• mv move a file to a new name/location. eg: 'mv ./foo /tmp/bar'
• pwd Print the current directory to the screen. eg: 'pwd'
• shutdown Shutdown/reboot the computer. eg: 'shutdown -r now'
• su Change to another user temporarily. eg: 'su root'
• tar Archive directories and their contents. eg: 'tar cf /tmp tmp.tar'
• rm Remove (delete) a file. eg: 'rm ./foo'

Getting Help • man Read the manual page for a command. eg: 'man ls' • apropos Read the one line summary for a command. eg: 'apropos ls'

Basic vi commands • i Change to insert mode (so you can type) • Change to command mode (don't try and type) • :w Save the file being edited (command mode only) • :q Quit (command mode only) • :q! Get me out of here now! (ignore unsaved work) • h/j/k/l Navigation keys if your arrows break (command mode only) (Try pressing scroll-lock first to try and make arrows work)

The basic parts of the filesystem • /bin Basic programs • /boot Bootloader files • /dev Device nodes for hardware and other non-file resources • /etc Configuration files • /home Where everyone's home directory lives • /lib Base system libraries • /lost+found When your filesystem breaks, the pieces go here. • /mnt Place to attach other filesystems (usually removable media) • /opt Optional packages (usually just KDE) • /proc Virtual filesystem for communication with the kernel • /root Root's home directory (root is special) • /sbin Basic programs that are usually only useful for root • /tmp Temporary file storage area • /usr 'User' files. Most stuff goes here. Programs in /usr/bin, libraries in /usr/lib, program resources in /usr/share, etc. • /var System and program state storage

Compiling programs from source (very general case) • Unpack the source archive: tar zxf foo-1.0.tar.gz • Go to source directory: cd foo-1.0 • Read README, INSTALL and output of ./configure --help • Run configure: ./configure (if it fails, identify the error and try to correct it). The most common error will be a missing program/library that is required for foo to work. • Make the program: make • Install the program: make install (This step usually has to be run as root, unless installation is to the user's home directory)

Recompiling your kernel (very high level. Read up on this!) • Goto the kernel source directory: cd /usr/src/linux • Configure the kernel to your liking: make xconfig / make menuconfig • Build the kernel: make bzImage • Build the kernel modules: make modules • Install the kernel modules: make modules_install • Install the kernel: Very distribution dependent. The kernel itself is arch/i386/boot/bzImage (unless you're on non-intel hardware) and should be copied to wherever your current kernel lives (usually / or /boot). • Update your bootloader to use the new kernel. For lilo, edit /etc/lilo.conf

Cool Programs to investigate (Character based/Command Line/Graphical) •ssh/sftp/scp: Secure remote access and file transfer •mozilla: Comprehensive web browsing and email handling package •ncftp: FTP isn't secure, but ncftp does it the best •evolution: Specialised enterprise-capable email program •traceroute: Find out what's between you and another system •galeon: The best web browser around! :-) (Trust us, Phil knows best) •lynx/links: Text-mode web browsing •gedit; Simple but extensible text editor •naim: Text mode instant- messaging •gaim: Slick multi-protocol instant messanger •emacs: If it can't do it, you've run out of hd space •OpenOffice.org: Fully featured office suite. Word-processing/Spreadsheets/Presentations •nano/pico: Simple user friendly text editor. Shock! •Abiword/Gnumeric: Standalone word-processor and spreadsheet programs. •gcc/gdb: Compile and debug code •xmms: Plugin based media player

 
To the best of our knowledge, the text on this page may be freely reproduced and distributed.
If you have any questions about this, please check out our Copyright Policy.

 

totse.com certificate signatures
 
 
About | Advertise | Art | Carnality | Community | Contact Us | Copyright Policy | Entertainment | FAQ
Link to totse.com | Science | Search | Society | Submissions | Technology
Hot Topics
Malware that just can't be beat
Many many problems with my computer.
Itunes, VLC, Windows Media, Youtube. Problems
Web browsing trouble
Looking for a new motherboard
vhs to dvd question
Future tech
Building a computer
 
Sponsored Links
 
Ads presented by the
AdBrite Ad Network