Top 10 commands you must know in Linux




This simple tutorial will give you an introduction to Terminal (command line) in Linux. This will help you if you are a newbie in Linux.With this you can start working(playing) with command line.


Terminal can be opened from accessories. I suggest you to use the shortcut Ctrl+Alt+T for opening a Terminal.

  1. Remember that giving "sudo" infront of any command will let you do it in root mode (similar to run as admin  concept in Windows) . we will use this when ever we need to install some softwares or updates.                                                                                                                                                                                                            sudo apt-get install update

    sudo apt-get install name-of-any-sofware

    The 1st command is used to update your Linux software. This update is similar to Windows update.2nd command is used to install any software directly from linux repository servers.
  2.  How to shutdown the PC after some time (auto shutdown). To do this in Windows PC you have to follow a long procedure. But in Linux you can do this by a simple command.                                                                                                                                                                                                                 sudo shutdown +minutes

    Here replace minutes with your desired time gap(in minutes only) after which you want to shut down the PC.

    Run this command and see the magic. Thats the power of Terminal in Linux :)
  3. want to open calender without touching mouse?.Then just type cal in Terminal . You will like it :)
  4. "cksum" is an interesting command to know whether a file has modified or not . type cksum, give a space and write file name. It will give you checksum and number of bytes.
  5. Do you use Ctrl+f option to search (in any OS). This can be done by "fgrep" command.                                                                                                                                                                                                                fgrep geeky file1.txt

    This will search for the word geeky in the text document named as file1 and print the line which contains the word.
  6. I want to create a new file. I have 2 options. Go to desktop right click. click on create new document.select empty document.                                                                                                                                                                                                      or simply I will type touch filename.ext

    Here ext is the file extension


    Ok.You have tried it. So remove the same file as shown below.
    rm filename.ext
  7. Now here comes an interesting one.



    How is it looking? cool ...:) isn't is ?

    To try this you give the command

    figlet your-name

    But the command line will say that you dont have figlet installed. so type

    sudo apt-get install figlet


    Now try again to see your name as above.
  8. Some times you may forget your Linux version details. Then you can try this command.
    cat /proc/version
  9. If you want to know which application is taking more memory and CPU you can try.

    top

    It will give you a lot of details.
  10. If any application is hanged then try
                Killall application-name