DEV Community

Cover image for 5 Basic linux commands with detailed explanation and their resemblance to windows.
Shubham Tyagi
Shubham Tyagi

Posted on

5 Basic linux commands with detailed explanation and their resemblance to windows.

Linux sometimes seems to be very difficult from the outside but once you get a head start there are a ton of possibilities with linux which are not available with windows. Obviously you may not get as attractive and beginner friendly interface as windows does but everything comes with a price doesn't it.

Here I will list 10 commands and explain them which you could try out yourself on your linux OS right away and experience it yourselves.

  1. df

    this command will show the amount of available disk space and used disk space for file system to which you as a user currently has access to. For eg : if you have a dual boot system established in your pc and your linux OS doesn't have access to the D folder.If you run this command on your linux terminal then you wont be able to see the partiton of used and unused space of D folder. this command is same as when you open the disk management tool in windows.
    df command

  2. top

    This command when you type in your terminal it will show the active linux processes which are managed by your linux kernel. This command is used like how you would use task manager in windows, the difference being , it shows the details of all the processes in far more depth than windows does.

    • it will look something like this when you type the command.
    • this is what is meant by each column head. you can press 'q' to exit this window in your termial.
  3. ls
    This command list all the files and directory present in the location of where you are in your system. for example if you are in a directory games which has 3 sub-directory. then this command will list those 3 sub-directory.
    observe in the below image how the directories are highlighted in the terminal.

  4. cd
    This command is a fairly self explanatory command,'''cd''' is a change directory command when you type

    cd [directory name]

    then you will be in that particular directory. If you type

    cd ..

    you will go in the root directory of current directory.

  5. touch
    This command is used to create a file. This works like when you right click and create a new document in windows. You have to type

    touch [filename.extension]

Top comments (0)