Skip to main content

Basic Commands Of Linux With Examples

In this blog, I will be describing a few Linux basic commands that are often used in the daily life.
The commands that we are going to cover in this blog are
  • Terminal.
    cal --------> calender
  • date --------> current time and date
  • cd --------> change director
  • mv --------> move
  • rm --------> remove
  • rmdir --------> remove directory (empty){cannot del non-empty dir}
  • man --------> manual
  • mkdir --------> make directory
  • touch --------> create empty file  
  • history --------> history of commands
    Always remember, in Linux case (upper case & lower case) does matter.
    leo@nemesis:~$
    1 2 3
    1--->account name
    2--->hostname of the computer name(computer name)
    3---->user is without root privilege

    If root is like adminstrator account in windows. In linux, root account has access to manipulate any file.
    __________________
    | root@nemesis:~# | <----- Here # means the user is with root privilege.
     ~~~~~~~~~~~~~~~~

     So, starting with the execution of commands on the terminal
     {comamnds are written after $ or # symbol.}

    1)cal
    leo@nemesis:~$ cal





    2)date
    leo@nemesis:~$ date
    Wed Aug 15 10:51:45 IST 2018

    3)cd
    In Linux there are no drives (unlike windows having C, D, E drives), there is only files and folders.
    like in windows " C:/ " is the main drive, Linux we have " / ".

    leo@nemesis:~$ cd /home/ opening "/home" on terminal
    leo@nemesis:/home$

    4)mv
    leo@nemesis:~$ mv ./Pictures/linux.png ./Downloads/
     
    Above command is moving the linux.png file to Downloads. In Linux " . " is used for the current directory.

    5)rm 

    leo@nemesis:~$ rm linux.png 

    removing the file named linux.png

    -----------------------------
    Try the other remaining commands.

Comments

Popular posts from this blog

Why command? - And - Linux Basic Commands II

This is my whatsapp no if you have any queries ping me up! :) Today, we will first discuss why should we use commands instead of GUI and then we will discuss more about commands. So, should we use commands?        Well, for that we need to know the difference. First of all, GUI is very easy but with commands, we have to remember many commands and their syntax, uses and many more. But what if we have to perform it 100 times?! For example,    What if you want to create a directory. easy! isn't it! But what if I tell you to create 1000 dir at once? With the help of commands, it can be done with only 2 words! Doesn't you fell awesome after knowing that!  The command line can be used to increase efficiency and less time consumming. We will discuss some more commands that are often used. List of the commands that we are going to cover in this blog are cp             ...