If you’re a newbie who wants to try out Linux or already using Linux in your system then it’ll be good for you to know some basic but very useful Linux commands before you enter into the world of Linux. It can save a lot of time, trouble and occasional headache. So let’s see how,
The ‘man’ command
You first, ‘man’ command shows the documentation associated with other linux commands which helps you in understanding their usage and all associated options.
Quick Use: ‘man <command>’ – Just replace ‘<command>’ with any command. Here are some examples,
- ‘man ls’ – Shows documentation of ‘ls’ command
- ‘man ps’ – Shows documentation of ‘ps’ command
Note: When you’re done reading the documentation of command press ‘q’ key to get out of documentation mode
The “sudo” command:
The most basic one ‘sudo’ is a command that can’t do anything on it’s own, instead you’ve to combine it with other commands to run them with root priveledges. It is to be noted that the ‘root’ user is the most powerful user on linux box who has all the priveledges. So use this command only when necessary. This is a must know command for a Linux user, be it a newbie or an advanced one.
- ‘sudo ls’ – Run ‘ls’ command with root priveledges
- ‘sudo rm -R lol’ – Run ‘rm -R lol’ with root priveledges
The ‘ls’ command:
This command is used for listing files and folders under particular folder. For using this command just type this command in the terminal along with the folder name. For more info type ‘man ls‘ in the terminal.
Note: Use ‘ls -l’ for getting more info(like file-size etc.) about the files/folders
The ‘ps’ command
This command is used to list the currently active processes. Use ‘man ps’ for getting more info about how to use this command efficiently. ‘ps -u’ command gives detailed information about active processes.
The ‘date’ command:
This is the most baisc one for a Linux newbie’s like my friend Ravi; he simply loves to use this. Well it’ll be a bit stupidity to explain the working of this command as it’s name says it all – displays the system date. It comes handy when you gotta meet your girlfriend and window manager fails.
The ‘mkdir’ and ‘cd’ commands:
Like windows ‘mkdir’ and ‘cd’ command are the two most important commands. The ‘mkdir’ command is used to create directories (folder). The ‘cd’ command is also known as ‘change directory’ command and it is used to do the same work i.e. to change directories.
- ‘mkdir lol – This command creates folder named “lol” under present directory.
- ‘cd ./lol’ – This command will jump to “lol” folder which is under current folder.
- ‘cd ../’ – To go one level above i.e jump out of current folder
The ‘rm’ command:
Now that you’re able to create folders you should be able to delete them too. So next command on our list just do that. The basic command, ‘rm’ is used to delete files and folders.
- ‘rm lol’ – This command will delete the file named ‘lol’ which is under current folder.
- ‘rm -R lol’ – This command will delete the folder named ‘lol’ which is under current folder.
I hope the above commands will help you in some way or the other while exploring your Linux distro. Remember – these are the very basic commands that novice Linux users love to add in their armory. We’ll be posting more amazing stuff on Linux very soon.