Skip to content

Basic Linux Terminal Commands: Beginner’s Guide

Hey everyone! How are you? Hope you’re doing well. Today, I will talk about the magical box that can be a lifesaver at those moments when you feel like you’re sitting at a computer for the first time but actually want to delve deeper and change things. You can also call it the command line or terminal, doesn’t matter. When I first encountered it, I was a bit intimidated, honestly. It felt like a secret puzzle game, but anyway, those days are behind me.

The Terminal might seem a little intimidating at first, I know. Like a completely black screen with a lot of strange letters and symbols on it… But believe me, it’s not that scary. Actually, as you explore and dive into it, you realize how powerful a tool it is. It’s like directly connecting to your computer’s brain. Of course, you need to learn its language a bit, but trust me, learning it is enjoyable.

Now, you might ask, “How is this command line useful to me?” You’re right, why bother ourselves unnecessarily? But think about it this way; when you want to install a program, move a file, or when something goes wrong with your computer, this command line can be incredibly helpful. It’s like a versatile handyman.

Especially if you’re using Linux, the terminal will become your closest friend. Of course, Windows has PowerShell, but the pure terminal experience in Linux is something else. For example, if you want to rename all images in a folder at once, instead of manually doing it through the graphical interface, you can handle it with a single command in the terminal. Isn’t that great? That’s why experimenting a little and learning can add a lot to you. By the way, I initially started using the terminal even for simple tasks like copy-pasting files, it might sound funny but it was true.

So, where do we start this magical journey? Let’s begin with one of the most basic commands: ls. This command lists all files and folders in your current directory. It’s like looking around a room to see what’s inside. Of course, the 'ls' command has different ‘parameters.’ For example, if you type ls -l, you will see detailed information about files: who created it, when it was created, the size of the file, etc. If you type ls -a, it also shows hidden files. Hidden files are those starting with a dot, like .filename. They are not normally visible, but with ls -a, everything becomes visible. Sometimes, understanding why a file isn’t visible can be solved by using ls -a.

Another fundamental command is cd. It means ‘change directory.’ It’s used to switch from one folder to another. For example, to go to the ‘Documents’ folder, you would type cd Documents. If you want to go back to the parent folder, you use cd ... That '..' is very handy. Imagine being in a maze and accidentally going down the wrong path—you can just go back one step with cd ... Sometimes you’ll also see cd ~, which takes you directly to your home directory. It’s a useful shortcut as well.

Now, there is the pwd command. It means ‘print working directory.’ This shows you exactly where you are in the directory tree. When you’re unsure about your current location, you can type pwd, and it will show you your current path. This is especially useful in complex directory structures; it’s like having a map when you’re lost in a forest.

Creating or moving files is also very easy. You use mkdir to create a new folder, for example, mkdir NewFolder. To copy files, you use the cp command: cp source_file target_location. To move or rename files, the mv command is used: mv old_name new_name or mv file target_folder. These are simple but fundamental. Just knowing the logic behind them makes everything much easier. For example, recently I realized I had put a photo in the wrong folder; I simply moved it with mv in five seconds. Honestly, it’s faster than through the graphical interface.

And what about deleting files? That’s what rm is for. But be careful! rm deletes files permanently; it doesn’t send them to recycle bin. There’s no way to recover them easily. So, be cautious with rm. For example, rm filename.txt will permanently delete that file. To delete a folder and its contents, use rm -r folder_name. Again, be careful, accidentally deleting important data can be frustrating.

As you can see, these commands are just the tip of the iceberg. But even this surface gives you a lot. It allows you to establish a more direct connection with your computer—like inspecting the engine of a car to understand what each part does. Learning these commands makes you a more knowledgeable user and helps you solve many problems on your own. If you want to learn more about this, just search on Google for basic Linux commands. Many resources are available.

There’s also the cat command. It displays the contents of a file directly on the screen. For example, to quickly see what’s written inside a text file, you type cat filename.txt, and the entire content appears. This is especially useful for reading log files or simple configuration files. Sometimes, instead of opening a configuration file with an editor, I just cat it to quickly check a setting.

Finally, remember: using these commands can lead to mistakes. That’s perfectly normal. Sometimes, I’d see an error message like “command not found” when I mistyped, and I’d try to understand the response. It’s part of the learning process. The important thing is to keep trying and not give up.

Let me also show you a small example. Suppose you want to move all files with a certain extension, such as all .jpg files in your current directory into a folder called “Pictures.” First, ensure that folder exists:

mkdir Pictures

Then, move the files:

mv *.jpg Pictures/

Here, *.jpg selects all files with the .jpg extension, and the command moves them into the ‘Pictures’ folder. It’s really practical. This example demonstrates the power of the terminal. When you need to process many files at once, the terminal becomes your best helper.

In conclusion, although the Linux terminal may look intimidating at first, it offers a very user-friendly interface. Learning these fundamental commands allows you to deepen your relationship with your computer. I used to take notes to remember these commands, and I still do. I hope this article inspired you to take the first step into the terminal world. Let’s get those keyboards moving!