Frequently used Linux Commands for Beginners
In the globe 90% of the IT industries consider Linux as the most reliable, safe and secured operating system. Linux is considered as the best operating system in all leading IT industries today for project development and deployment in production. Hence it is very necessary for all of us to learn how to work on Linux. At the end of this tutorial you will feel very confident to work on linux operating system.
|| $ ls|
This command shows list of all the files and directories present on the current working directory of your machine.
|| $ ls ~|
This command shows the list of files that are present in your home directory.
|| $ ls -ltr|
This command will display you the file having named mentioned in command and will give you all the details of that file.
|| $ ls –ltr|
This command will list you all files according to the order of time in which they were created. Here “ltr” stands for l- long listing, t- time, r- recursive. The list displayed contains file name, file permissions, owner of the file, group, date and time of file creation and links.
|| $ df|
“df” is “disk filesystem”. The actual task of this command is to show a detailed summary list of the total disk space available and used disk space on file system of your Linux system.
|| $ df -h|
‘-h’ parameter is used to display the summary of the total disk space used and available on your linux file system in human readable form, this means it shows the details in the form of bytes, MB (mega byte) and GB (gigabyte).
|| $ mkdir|
If you want to create a new directory on your linux filesystem you have to use “mkdir” command. For example- “mkdir dataflair”, this command will create a directory named dataflair on your linux filesystem.
|| $ rm|
This command is used to remove a file from your linux filesystem. Executing this command will delete that particular file of which you had written name followed by rm. For example- “rm data”, this will remove file named data present on your current working directory.
|1 $ rmdir|
This command is used to remove a complete directory from your linux filesystem. This command will remove directory specified by you. For example- “rmdir mystuffs” will delete the mystuffs directory from your linux filesystem.
|| $ pwd|
“pwd” = “Present Working Directory”. It gives you the name of the directory name on which you are currently present or working and shows the path of that directory.
|| $ cd|
“cd” is change directory. By the name itself it is clear that this command is the most useful command of linux. With the help of this command a user can easily navigate to the directory of his choice at any moment of time. This command changes the present working directory of the user, to the directory name specified by the user in which he wants to navigate.
|| $ cd /|
This command is used to navigate into the root directory of users linux filesystem.
|| $ cd
| $ cd ~
This command is used to navigate to the home directory of the user.
|| $ cd..|
This command is used to navigate one directory level up of the user current working directory.
|| $ cd –|
The usage of cd command is to navigate to the previous directory or simply go one directory back to the directory which user visited. It is used to go one step back to the recent visited directory.
|| $ clear|
Now after practicing a number of commands it is obvious that your command terminal has fully filled up with lots of commands and their usage. Hence to practice a new command form a fresh new screen we use “clear” command. This command clears all the data present on your linux terminal window.
|| $ mv|
The main function of this command is to change the name of a file/directory or to move a particular file/directory from one place to another.
|| $ cp|
This command is used to copy files/directory from one place to another. With the help of this command user can easily create multiple copies of a files/directories.
|| $ cat|
This command displays all the contents of a file specified by the user on the standard output device i.e. your computer screen.
|| $ du|
The term “du” is short form of “Disk Utility”. The actual work of this command is to display you the details about how much space is occupied by a file/directory in the disk.
|| $ du -sh|
In the above command (“-s”= Summary and “-h”= Human Readable). This means it shows the details of the space occupied by a file/directory on disk in human readable format like bytes, mega bytes, giga bytes, etc.
|| $ touch|
This command creates an empty file with the specified name on the present working directory of the user. An empty file with size 0 bytes gets created which remains unchanged until user makes any changes on it.
|| $ who|
It displays the number of users who are currently logged on your linux operating system.
|| $ echo|
This command displays all the text written after the word “echo”. For example- echo My House name is Sweet Dreams, this command output will be: “My House name is Sweet Dreams”.
|| $ date|
This command displays the current date and time of your system. By using this command you can easily know the current day and time on linux terminal.