10 basic Linux commands to learn for every Beginner

Commands are a way of telling Linux what needs to be done

Linux command lines may look initially like it’s out of the comfort zone for beginners but as one start learning, it becomes the obvious choice for performing tasks, mostly for remote login and troubleshooting purposes. So what are Linux commands? Commands are the user input tasks in the Terminal of a Linux OS.

To start with, here are the 10 basic commands that you need to know.

1. ls

ls command lists the contents of the directory. The below screenshot shows the ls command in use to display the folders in the top level of my Manjaro Linux PC.


ls command in Terminal
ls command in Terminal

2. cd

cd (change directory) command is used to navigate into the directory. It is similar to clicking through a folder by using mouse. Additionally, cd [dir] – Changes the current directory to dir.

cd [directory name]

Showing cd command use
Showing cd command usage

Use of cd without specifying a directory is a quick way of returning to a home directory if you were deep inside a directory. See below example.

cd command usage
cd command usage

3. pwd

pwd command displays the present working directory name. Use this command to know what directory you are in. See below example.


pwd command usage in Manjaro Terminal
pwd command usage in Manjaro Terminal

4. man

man command shows the manual for the command. For instance ‘man cd’ shows what’s the use of cd command. Type q to quit viewing the manual page.

man [command]

man command displays details of any command
man command displays details of any command

5. clear

clear command simply clears the terminal screen. Use it when there is too much in terminal than you can handle.


6. mkdir

mkdir command allows the user to make a new directory. It’s just like right-click and creating a new folder in the file explorer (GUI way). Usage is shown below:

mkdir mytempfolder

7. locate

locate command is like search and find. You can use wild characters to locate a file. Note that the command is highly case-sensitive. Therefore search the file keeping this in mind. Here is an example:

locate mytempfolder

8. rmdir

rmdir command deletes the directory you specified. For example, to delete the directory ‘mytempfolder’ created in 6, use the following command:

rmdir mytempfolder

9. exit

exit command in Terminal is used to close the terminal.


10. echo

echo displays arguments on screen. Here is its usage example:

echo [text]

echo command usage in Ubuntu terminal
echo command usage in Ubuntu terminal

Hope you enjoyed knowing all these basic Linux commands. Try using them whenever possible.

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of FOSSLinux.com. I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities, especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. I hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more and spread Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!


Please enter your comment!
Please enter your name here





The Ubuntu Cinnamon Remix brings together Linux Mint's Cinnamon desktop with the Ubuntu Core. While some users are welcoming the new flavor of Ubuntu with open arms, others are scratching their heads, wondering where it fits in.
The wait is finally over (almost) for all you Ubuntu fans out there. The latest version of Ubuntu, 20.10 codenamed "Groovy Gorilla," is currently available in the beta version. I have tested out the distro myself, and it is stable enough to take out for a spin.

The 10 Best Linux Server Distros For Home And Businesses

By the year 2020, it is estimated that there are close to 600 Linux distributions in the market. It includes both servers and Desktop versions; therefore, if you are looking for lightweight Linux distribution for your old PC or a reliable desktop version for employees in your organization, you may be overwhelmed with the number of choices for finding one for your use.

CopyQ – Advanced clipboard manager for Linux

We have all had that moment when we copied a text, but we first needed another one, and in the process, lost the first one. If you're lucky, you can get it back quickly with a bit of work.

10 Linux Based Mini PCs to Buy in 2020

It won't be wrong to say that mini PCs have all the potential in the world to take over the computer market shortly. Not only do they save a lot of space on your computer desk but also work in a very power-efficient manner while also causing less noise. Although they could be a tad more expensive than regular desktop PCs, they will actually save you some money in the long run.

Getting Started with Linux Operating System

The Linux operating system brings forth a vibrant mix of features and security, making it the best alternative to macOS or Windows operating systems. In this post, we will give you a master guide on Getting started with Linux systems - taking you from a complete beginner to a level where you can begin testing the various Linux distributions available with much ease.