Sunday, April 19, 2009

Most Useful Linux Commands

There are thousands of commands in Linux, mastering of all is almost impossible. So the better idea is to know the basic commands and their syntax. Following is a list of commands which are very often required:

Most Useful
1. ls
2. mount/unmount
3. cd
4. cd ..

Useful for basic administration
1. alias/unalias
2. df/du
3. switchdesk
4. tar: tape archive

  • compress .tar: tar -cf
  • extract .tar: tar -xf
  • compress .tar.gz: tar -zcf
  • extract .tar.gz: tar -zxf
  • compress bzip (.tar.bz2): tar -jcf
  • extract bzip (.tar.bz2): tar -jxf
5. time
6. whereis : locate binary, source, manual pages for command
7. grep
8. find
9. zip/unzip:

  • compress (.zip): zip -r name_of_archive list_of_files
  • extract (.unzip): unzip name_of_archive
  • compress (.bz2): bzip2 name_of_archive list_of_files
  • extract (.bz2): bunzip2 name_of_archive

Package Manager
1. Debian/Ubuntu:
  • apt-get: sudo apt-get update/upgrade
  • apt-cache: sudo apt-cache search kde3
  • aptitude:
  • dpkg: sudo dpkg -i xxx.deb
2. Fedora: yum
3. Suse: yast

Advanced
1. screen
2. nice/renice
3. xargs

Network

1. host - makes DNS lookup
2. ip - network interfacing utility


Advanced Administration



1. kubuntu distribution version: lsb_release -a
2. A simple text editor: ed
3. dump files in binary formats: od

No comments:

Post a Comment