Introduction
Every time I mention to one of my friends that I use the terminal instead of the GUI (Graphical User Interface) to do most of my maintenance tasks on my computer, I always get the same question:
"Why are you complicating things?"
Most people fear the terminal, and that's completely reasonable. Who wouldn't? It's literally just a black void where every word you type either spits out an ugly wall of text or breaks something on your machine. (From personal experience, I don't recommend copying and pasting every random command you find on the internet.)
But that's about to change.
In this article, I'm going to show you why the command line can actually become your friend and introduce you to ten beginner Linux commands. These commands will be a great starting point for your Linux journey.
Why Learn Linux Commands?
Before I start listing commands and showing examples of how to use them, I want to convince those of you who are still hesitant. And what better way than to show you a few reasons why learning Linux commands is actually worth it?
First of all, imagine your usual workflow whenever you want to do something on your computer. If I'm guessing right, you boot up your machine, move your mouse to the application you want, click it, then keep moving the mouse around to complete whatever task you need.
Now think about how much time you spend moving the cursor from one place to another. You'd probably say, "Not much."
But it actually is—especially when you add it all together. Every extra movement takes a little bit of time, and those seconds quickly turn into minutes throughout the day.
Now compare that to using the command line. You open the terminal, type one command, press Enter, and you're done. That's not one mouse movement replaced—it's the entire task completed with a single command. For example, moving a bunch of files from one directory to another.
Keep that thought aside for a second.
Have you ever had to repeat the same boring task over and over again, thinking, "There has to be a better way to do this."
You're right—there is.
Enter automation.
Using the shell (I'll explain the difference between the shell and the command line in another article), you can write small or large scripts that automate repetitive work. Once you've written them, you never have to deal with those tedious tasks again.
Last but not least, almost every programming tutorial on the internet assumes you're comfortable using the Linux terminal. Learning these commands now will make following those tutorials much easier.
pwd
Very useful when you don't want to get lost in the "big scary terminal."
[host@user ~]$ pwd
pwd stands for Print Working Directory. It simply prints your current location in the filesystem.
Example output:
[host@user ~]$ /home/user
ls
Use this command whenever you want to see what's inside a directory.
[host@user ~]$ ls /home/user/
Output might look something like this:
Downloads
Audio
Pictures
my_cv.pdf
If you want more details, use the -l flag (click here to learn more about command-line flags).
[host@user ~]$ ls -l /home/user/
Example output:
drwxr-xr-x Downloads
drwxr-xr-x Audio
drwxr-xr-x Pictures
-rw-r--r-- my_cv.pdf
The first column represents the file's permissions. (Click here to learn more about Linux file permissions.)
Also, if you want to learn more cool ls tips and tricks, click here.
cd
This is your main way of moving around in the command line. cd stands for Change Directory.
[host@user ~]$ cd [target_directory]
Example:
[host@user ~]$ cd Audio
To return to your home directory:
[host@user ~]$ cd ~
mkdir
Creates a new directory.
[host@user ~]$ mkdir [new_directory_name]
Example:
[host@user ~]$ mkdir /home/user/Documents
touch
Developers use this command all the time to create empty files.
[host@user ~]$ touch [new_file_name]
Example:
[host@user ~]$ touch /home/user/test.txt
cp
As the name suggests, it copies a file to another location.
[host@user ~]$ cp [source_file] [destination_directory]
Example:
[host@user ~]$ cp /home/user/test.txt /home/user/Audio/
mv
Useful for moving files and directories.
[host@user ~]$ mv [file_to_move] [destination]
Example:
[host@user ~]$ mv /home/user/test.txt /home/user/Documents/
You can also use it to rename files and directories.
[host@user ~]$ mv [old_file_name] [new_file_name]
Example:
[host@user ~]$ mv /home/user/test.txt /home/user/new_name.txt
rm
Removes files.
[host@user ~]$ rm [file_to_remove]
To remove a directory along with all its files and subdirectories:
[host@user ~]$ rm -rf [directory]
⚠️ Be careful with this command. You definitely don't want to delete your entire system.
Example:
[host@user ~]$ rm /home/user/Documents/test.txt
cat
cat stands for concatenate. It can display the contents of one or more files.
[host@user ~]$ cat [file_name]
With a single file, it simply prints its contents.
[host@user ~]$ cat [file_name] [second_file_name]
With multiple files, it prints them one after another.
man
This is probably one of the most useful commands you'll learn. man stands for manual.
[host@user ~]$ man [command_name]
It opens the command's manual page, where you can learn about every available option and flag.
Bonus
Here's a quick bonus tip.
You don't always have to type out the full command or filename. If what you're typing already exists, simply press the Tab key and the terminal will automatically complete it for you.
It's one of those little things that doesn't seem like much until you start using it every day.
Conclusion
Learning Linux isn't about memorizing hundreds of commands. These ten commands are enough to make you feel comfortable navigating the terminal, and you'll naturally learn more as you continue using Linux.
Don't just read this article and think you've got the gist of it—you need to practice. Open a virtual machine, use an online Linux sandbox, or install Linux somewhere you don't mind experimenting. Try every command yourself and get used to working in the terminal.
I'd love to know if this article changed your opinion about the command line.



Top comments (0)