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