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




How to install CMake on Ubuntu

CMake is a cross-platform free and open-source software tool designed to build, test, and package the software. CMake uses a simple platform and compiler-independent configuration files to control the software compilation process.

How to install Lightworks on Ubuntu

Even though Linux may not get a native installer of video editing software like Adobe Premiere or Final Cut Pro, that doesn't mean there are no industry standards tools available. Lightworks is non-linear editing (NLE) video mastering app for Windows, Linux, and macOS. Installing it on Ubuntu is simple due to deb package availability.

How to install DaVinci Resolve on Fedora

Davinci Resolve is a professional application used for color correction, video editing, visual effects, and motion graphics. It is one of the extensively used software by movie industries located in Hollywood.

The 10 Best Programming Languages for Hacking

One of the significant entities we have in Cyber Security is Ethical Hacking (ETH). It is the process of detecting and finding flaws or vulnerabilities in a system that a hacker would exploit.

5 Ways to Open a Terminal in Ubuntu

Even though Ubuntu supports many applications with amazing Graphical User Interfaces (GUI), there are always reasons why users prefer using the Terminal to perform different tasks.

How to install Wine on Fedora Workstation

Linux distributions are becoming more and more popular every day, and Fedora Workstation is not left behind. This popularity brings forth the need to run Windows applications on Linux distros like Fedora. Windows has quite some excellent Software that is not available for Linux.


Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

15 Tar command in Linux uses with examples

Tar is a famous utility that is basically used for collecting multiple files in a single archive. This file is often called a 'tarball'. Today, we are going to tell you about the different things you can do with tarballs using the tar command, with practical examples.

Beaker Browser: A P2P web browser you must try

I think we can all agree on the fact that the web browser is an integral part of our Linux systems, or any computer system, for that matter. We have had several fulfilling options for browsing the web, like Firefox, Brave, Vivaldi, Tor, etc. and they have worked pretty well, but also pretty much in the same way, except for Tor, which is much better for anonymity.

10+ Best Python IDEs for Linux

Python programming language is applied in so many areas of computer technology, i.e., Scripting, GUI development, Website development, Artificial Intelligence (AI), Machine Learning, Data Science, Computer Networking, and Network Automation, and Cyber Security.

5 Best Ways to Free up Hard Disk Space in Ubuntu

Hard disk space can easily get filled up with cached package files, old kernels, and other obsolete files that occupy unwanted hard disk space. Here are top five best and safer ways to clean and free up hard disk space in Ubuntu. We show you Terminal and GUI way of cleaning up system.