Hey there! Welcome to Part 8 of my Linux series where we learn useful things that you can do in Linux, especially if you’re coming from a different OS (Mainly Windows or MacOS, but this is useful for those coming from another different OS too!). In this part, we discuss different terminal commands that are very useful (and even fun!) to deploy while you’re using Linux. Don’t be intimidated, there is no skill requirement to use the terminal. The only requirements are practice, patience and persistence. Lets get started! If you’re new here, you can investigate the series from the beginning or the most recent part (Part 7) if you want to get caught up. I’m glad you’re here!
Why the Terminal?
The terminal is a very useful tool for telling your computer what to do. Of course with most Linux distributions (distros) you can use the mouse to get things done through the Graphical User Interface (GUI). The GUI actually uses a set of pre scripted command line actions that you could do in the terminal. For example, if you pull up your web browser by clicking your web browser icon on your desktop, the act of clicking (even double clicking) triggers some sort of command to either run, execute or open your web browser program. Every action, as a matter of fact, on a computer corresponds to a command that can be run in the terminal. “Well,” you may think, “The GUI is easier, I just point and click, I don’t have to remember all of these complex commands.” I see where you’re coming from and it could be true, but in most cases the terminal could be better. Why? Well, read on and you’ll see!
Opening the Terminal
Opening the terminal is very simple. To begin, boot into your Linux install and open your app launcher. Depending on your distro, the easiest way to pull up the terminal is to search “Terminal.” Once it shows up in the search results, click “Terminal” at the top of the list.

Once you have the terminal pulled up, it should look like this:

The Terminal Has It All
The thing that differentiates the terminal from the GUI is that the GUI only allows you to do what the the GUI is prescripted for. Think of the GUI as the top layer of the Linux system. Whatever the developers code into it (buttons, sliders, cute little graphics that make it look nice) is what you’re limited to. I’m not saying that the GUI is trash, I’m just saying that the GUI is like a train: it is limited by the “rails” that it runs on and can’t go anywhere else without modifications.
GUI vs. The Terminal
By comparison, the terminal gives you access to your entire system There are actually a LOT more commands you can use in the terminal that aren’t available in the GUI. For example: want to rename a file in the GUI?
Take the three files below for example. Their naming convention isn’t very proper; it lacks good nomenclature. How shall we rename them?

We could of course right click on each file individually with the GUI and type each name out.

Right clicking is ok, but does it scale well?
Perfectly acceptable . . . until you have like 500 files to do this with. Of course you might not ever have to rename 500 files. But lets say you have 1,000 photos, all with random names that your PC generated that involve a weird naming convention like “010226.jpg, 010326.jpg, 010426.jpg,” etc. Of course we can easily see that naming process involves January 2026 but it offers no context beyond the date, right? What if you’re walking a gorgeous walking trail and want the convention to follow something like “MntnTrlMrngW_Mom1, MntnTrlMrngW_Mom2,” etc.? Lots more context there, right?
Well, with the terminal you can tell your file system to change the names of all three files in one command AND create a sequential naming convention for all of the files. Lets use the LibreOffice example that we discussed above. Using the below terminal command, we are going to create new file names and a sequential, sensible naming convention. First, I’m going to tell the terminal to focus on where the files are (I’ll explain this more later). Please begin by copying the code below:
cd ~/Desktop/Example
Paste it into your terminal and press Enter

Breaking down the “cd” command
The “cd” in the code means “change directory.” Literally it means “switch your focus to the following folder” so that each command afterwords will be completed on the files within the directory (I’ll show you more about what “cd” can do later).
The space between “cd” and “~/Desktop/Example” actually means something too. It is called an “argument separator.” It separates the command (in this case “cd”) and the argument (“~/Desktop/Example”). The command is the action so to speak and the argument is the target that the command will act on. Therefore, the entire command reads: Change directory to the “Desktop” directory within the “Example” subdirectory (that isn’t official “Linux Speak,” it’s just my own spin on it).

The “~/Desktop/Example” means as follows: The “~” is a tilde. Within the Linux terminal it is a shortcut that means “your home directory.” The “home” folder normally follows the “/home/username” convention. For example, mine would be “/home/threestrandtech”
The “/” as you likely know is a forward slash. It is called a “path separator.” It means “inside.” Therefore: “~/Desktop/Example” means “inside my home directory, go to the Desktop folder, then go to the Example sub folder.”

Notice that on the next line it shows “~/Desktop/Example$” which means that we are now working in the proper directory where the document files are.
Next, type the following command into your terminal and press Enter:
ls

The command “ls” tells the terminal to list all of the files in the working directory. Notice that all three files are mentioned in the output. Now, we are going to change the name of all three files with one command. The following command is what we will use. It’s not super important right now to know what it means but I will explain it simply in a moment. There is a particular way that this command has to be put in.
i=1for f in *.odt; do mv "$f" "Hello-$i.odt" ((i++))done

- Put in “i=1” and press Enter
- Type in “for f in *.odt; do” press Enter
- Type in mv “$f” “Hello-$i.odt” press Enter
- Type in ((i++)) press enter
- Type in “done” press enter
The simple explanation for this command is that it is a loop that runs through each file in the directory. It basically says “for each file in this directory, name the file ‘Hello’ but put in a dash and a 1, then run the loop again for the next file, but this time increase the number from the previous loop by 1. Once all files have been run, stop the loop.” Once I ran the loop, I checked the directory. Lets see how it looks.

Perfect! Our files are showing “Hello-1.odt” and then were increased by one for each time it went through the loop. Let me be honest here, right clicking and renaming the files through the GUI would have worked just as well, but what if we had 500 files to rename? What if it was 1,000 pictures? Right clicking and renaming just isn’t an option. This is the usefulness and power of the terminal as a tool. A command would save hours of right clicking and renaming or whatever else you need to accomplish.
Terminal Commands
That was a really long explanation but I think it was worth it. Let’s go over some other commands, eh?
1. “pwd” Shows you where you are
Let’s go back to the folder that we just renamed. If you type in “pwd” and press Enter it will show you all the contents of the directory that you’re in.

Notice that the output (in white text) shows “/home/threestrandtech/Desktop/Example.” I want to point something out: only the “/Desktop/Example” shows in blue at the end of the line. But in the “pwd” output, you also see /home/threestrandtech . . .” etc. This is useful if you have a lot of subdirectories that are connected to the one you’re working with, especially if you need to change directories and go back a few levels.
2. “ls” shows you whats inside the folder you’re working with
We covered this one above but yes, “ls” literally “lists” the contents of the folder you’re working on. It helps you view what files are in the directory you’re working in without having to pull up a file manager using the GUI.

3. “cd” tells the terminal to switch focus to a new folder
We talked about “cd” above, but here are two more uses for it:
cd /
“cd /” will take you to the filesystem root (which means the most main folder of your PC. If the King of a country was citizen #1, this folder would be the King folder, so to speak)
cd . .
“cd . .” means to go up one level. For example, if you were in the /desktop/dave folder and wanted to switch to working on the desktop folder, then “cd . .” would move you to the /desktop folder.
4. “mkdir” creates a new folder for you
This one is pretty straight forward. It simply creates a new folder. There is some syntax involved of course. As you see below, the syntax is “mkdir,” then whatever options you’d like to apply to the command (more on this later), and the name of the new folder at the very end.
mkdir "options" Folder_Name
You can create a single folder
mkdir workouts

Multiple folders
mkdir workouts nutrition flexibility
Before

After

Or even nested folders (a folder inside a folder). To create a nested folder, you have to enter in mkdir and then type the “-p” option right after mkdir, followed by the parent folder name, then you’ll need a “/” (the “/” tells the system to create a folder inside another folder, with the folder on the left side of the “/” being the parent, and the folder on the right side of the “/” being the child (inside) of the parent folder)
mkdir -p health/workouts
Before

After

Let’s discuss a few more options available for the mkdir command. First, we will discuss the “verbose” option.
Verbose Option
When you are working in the terminal, there is an option to have the terminal print a line of output that effectively lets you know what happened as a result of your command. The option is called verbose and it looks like this “-v.” The format follows the same as we discussed earlier with the parent option (“-p”). The “mkdir” is the command, the “-v” is the option and “cardio” is the argument. To try it for yourself, copy and paste the following command into your Linux terminal and press Enter.
mkdir -v cardio
Before executing the command:

After:

You can also combine the -v with -p. When you combine them, you just need one “-” and then both letters. “-pv” Try the below code in your terminal for practice.
mkdir -pv cardio/treadmill/eliptical
Before

After

Referencing our above question about the terminal vs. the GUI, we have output in the terminal, a created folder on the desktop, and two subfolders created all in one command, instead of the many clicks that would be involved if we used the GUI. Quite powerful eh?
5. “cp” tells the terminal to copy something
When you need something copied, you want to use “cp.” It’s best use cases include copying configurations before editing them, duplicating files and moving files into a shared directory for collaboration projects.
The basic syntax of “cp”
cp "options" source destination
What the “cp” is essentially saying is “take the ‘source’ file and copy all the data and put it in this new file with a different name with the same data. You end up with two separate files in terms of the name but the data itself is duplicated.
Note: if the file doesn’t exist, Linux creates the file. If the file does exist, Linux erases the contents right away and writes the data over from the source file and doesn’t tell you what it did. Bear this in mind as you use cp.
Lets do an example. First, go to your app launcher and open your text editor app. Type some random text into it and save it to your desktop. Next, open your terminal. Your screen should look something like this when you’re all done:

What we are doing here is we are going to take the “Linux is super amazing” file and create an exact copy of it on the desktop. To make this easy, lets do a quick “cd” command to make sure the terminal creates the copy to the desktop and not somewhere else. Begin by using the command below:
cd Desktop/
Note: We don’t have to do this “cd” command but for convenience we are doing it this way (I’ll try to do a deep dive series on Linux commands at some point to show the myriad of available options)

Perfect, we’ve changed to the proper directory. Next, lets copy and paste this command:
cp "Linux is super amazing.txt" "Linux is the best.txt"
Before . . . (Press Enter/Return) to run the command)

And after . . .

Notice that the new file is created. There are a great many options available for the “cp” command but we will stick with this one. Feel free to try each of these commands out to get used to them. As you transition to Linux from Windows I believe you’ll find that the terminal is quite powerful, flexible and efficient.
Wrap Up
In this tutorial we learned of the terminal and why it can be very useful compared to the GUI (although without the GUI a lot of people would probably not feel comfortable using computers). We learned of a few useful commands such as “pwd,” “ls,” “cd,” “mkdir” and “cp.” They do indeed make Linux easier to use but they make the system complete in that there are so many tools and options within Linux that allow a person to do most anything that they may need to do.
I hope that you feel the same way about Linux’s utility as you learn. If you have any feedback or need any help with the exercises in this guide, feel free to leave me a comment and I’ll do my best to assist. If you found this article in any way useful please leave a like and perhaps share it with someone who might find use of it as you have.
For the next part of the series (Part 9) we are going to revisit the subject of backups, but not in quite the same manner. In part 4 we talked about Timeshift, a useful tool for reverting system settings to an earlier working state and we also discussed cloud syncing of files too. In Part 9 we will discuss backups to an external drive to complete our Linux backup apparatus. I hope you’ll join me. Have a great day!
If this article has helped you in any way, would you consider donating to the site to help support my work? You can donate as little as 1 dollar USD. Thank you for your time!
Make a one-time donation
Make a monthly donation
Make a yearly donation
Choose an amount
Or enter a custom amount
Your contribution is appreciated.
Your contribution is appreciated.
Your contribution is appreciated.

Leave a Reply