Basic Terminal Commands

Harish Nishad
2 min readAug 7, 2020

The traditional Unix environment is a CLI (command line interface), where you type commands to tell the computer what to do. That is faster and more powerful but requires finding out what the commands are. The basic commands that you will be using more frequently are

  1. sudo:

This SuperUserDo is the most important command Linux newbies will use. Every single command that needs root’s permission, need this sudo command. You can use sudo before each command that requires root permissions — $ sudo

2. ls (list) :

Just like the other, you often want to see anything in your directory. With list command, the terminal will show you all the files and folders of the directory that you’re working in. Let’s say I’m in the /home folder and I want to see the directories & files in /home. /home$ ls

3. cd:

Changing directory (cd) is the main command that always be in use in terminal. It’s one of the most Linux basic commands. Using this is easy. Just type the name of the folder you want to go in from your current directory. If you want to go up just do it by giving double dots (..) as the parameter. Let’s say I’m in /home directory and I want to move in usr directory which is always in the /home. Here is how I can use cd commands — /home $ cd usr /home/usr $

4. mkdir :

Just changing directory is still incomplete. Sometimes you want to create a new folder or subfolder. You can use mkdir command to do that. Just give your folder name after mkdir command in your terminal. ~$ mkdir folderName

5. rm :

rm is a command to remove your file or even your directory. You can use -f if the file need root permission to be removed. And also you can use -r to do recursive removal to remove your folder. $ rm myfile.txt

6. cat :

As a user, you often need to view some of text or code from your script. Again, one of the Linux basic commands is cat command. It will show you the text inside your file.

--

--

Harish Nishad

“My name is Harish Nishad and I am a Junior Web Developer. I am an accomplished coder and programmer, and I enjoy using my skills to contribute.