3 Terminal Commands for Beginners

Photo by Gabriel Heinzer on Unsplash

In this article you’ll learn how to navigate around all your files and create a new directory.

For those new to Linux, a directory is simply a folder – ‘Directory’ is the traditional term.

(If you’re viewing this on a phone, you might need to rotate your device to see all the commands clearly)

When you first open the terminal you will see a command prompt. It usually looks like this:

username@computer:~$ _

Here’s what each part means:

  • username → the account you’re logged in as
  • computer → the name of your computer
  • ~ → shows you’re in your home directory (your personal folder)
  • $ → means you’re using a normal user account

Alright, let’s get moving around your terminal.


List – ls

The first command is simple — it’s called LIST and it shows everything that is in the current directory. Simply enter:

ls

This will show you all the contents like this:

username@computer:~$ ls
Desktop      Downloads    Documents    Videos     archive.tar  file.docx    photo.jpg    

Directories appear in blue, while files show up in various colours depending on their type or format.

These colours may differ depending on your distro.

Now let’s go into the Documents directory.


Change Directory – cd

To change directories we use the cd command. So let’s type:

cd Documents

(Linux is case-sensitive for all files and directory names, so Documents is different from documents.)

username@computer:~$ cd Documents
username@computer:~/Documents$ _

Now you’ll notice that our command prompt has changed to show you’re now in the Documents directory.

If you want to go back to where we came from we can just type:

cd ..

The ‘..‘ just means parent directory.

username@computer:~/Documents$ cd ..
username@computer:~$ _

You can also jump straight back to your home directory from anywhere by typing:

cd ~

username@computer:~/Documents$ cd ~
username@computer:~$ _

Make Directory – mkdir

The Make Directory command does just that. Use mkdir with the name of the directory you want to create. So, let’s create a new directory in our home directory and call it ‘example’.

First, let’s navigate back to home:

username@computer:~/Documents$ cd ~
username@computer:~$ _

Now type:

mkdir example

username@computer:~$ mkdir example
username@computer:~$ _

Now lets check it has worked with the list command. Type:

ls

and you’ll see the new directory has been created:

username@computer:~$ ls
Desktop      Downloads    Documents    example      Videos     archive.tar  file.docx    photo.jpg    

You’ve Got the Basics

That’s it! With these three commands, you have the essentials to start navigating the Linux terminal:

  • ls — see what’s in your current directory
  • cd — move between directories
  • mkdir — create new directories

These commands form the foundation for everything else you’ll do in the terminal. They let you explore your system, find files, and organise your folders.

Once you’re comfortable with these, you can move on to commands for copying files, deleting items, and installing software. For now, spend some time practising these three — repetition is the best way to make them second nature.