Seven Basic and Useful Commands in Linux

Intro

First, Linux is Kernel, not Operating System (OS). There are so many OS based on Linux Kernel. Such as Ubuntu, Fedora, CentOS, etc. These are called Linux distribution or distro.

By the way, the purpose of this blog is not about introducing Linux and Linux distro. We are going to know about seven very common and useful commands in this blog. And all of these commands are the same for all Linux distros. That’s why I mentioned earlier about Kernel and distro.

To run a command, we have to open the terminal. The terminal is for writing commands and gives instructions to a computer to do something.

Let’s get into the command list.

ls

ls is one of the most frequently used commands in Linux. It prints all the directories and files of the current working directory you are in.

pwd

When you write this in your terminal, it shows you the path of your current working directory. More precisely, the directory in which you opened the terminal or that directory you navigated through the terminal.

cd

To navigate one directory to another, we use the cd command. The rule of writing is cd dir_path. Suppose you want to go to the folder movies, which is in your current directory. To do that, you have to type cd movies. If you want to back to the previous directory, just type cd ...
If you enter the only cd, it will take you to the home directory.

touch

touch is another useful command for creating a new file using the terminal. To create a file using this command, we have to type touch filename. Suppose we want to create a file called text.txt. For that, we have to type touch text.txt.

mkdir

This one is similar to the previous one. The difference is that by this command, we create a folder/directory instead of a file. Let’s create a folder/directory called Linux. To do this, we have to type mkdir Linux. Pretty simple.

rmdir

I hope you already understand what this command does? Yes, you are right. By this command, we remove a folder/directory. Let’s see how to remove the previously created folder with this command. Remember, this command only allows to remove empty folder/directory. The command is: rmdir Linux.

open

This command is used to open any Application, File, Folder, etc from the terminal. For that type: open foldername/filename/appname/etc.

Final Words

Terminal in Linux is so damn powerful. Anyone can do powerful and useful stuff using Terminal. But this blog is for only beginners and showed only some very basic stuff.

If you are interested to learn more about it, you can. In this tech era, knowledge is more open than ever.

Scroll to Top