One of the myths surrounding the Linux operating system is that you have to run all sorts of complicated commands to do anything. While that may have been true some time ago, it is no longer true.
You could live your whole life with Linux and never run a single command. That’s how far the Linux desktop has evolved over the years.
Also: The First 5 Linux Commands Every New User Should Learn
However, for some users, the power offered by the Linux CLI (command line interface) can be tempting. And, as someone who has used Linux for decades, I still turn to the command line for certain things.
That’s because the CLI can be really efficient. For example, there are two features you should know about that make using the Linux command line even easier: tab completion and history. Let me explain each of them.
How to use the tab completion function
What you will need: The only thing you’ll need for this is a running instance of Linux. It doesn’t matter which distribution you use, as both features are found in all versions of the open-source operating system.
Let’s say you know there’s a command you need to run but you can’t remember its name. You know it starts with systembut that’s all you can remember.
Once your terminal window is open, type system and press Tab on your keyboard. You should see all the commands on your system that start with system.
Browse the list until you find the command you need.
Trying to remember the systemctl command is easier with tab completion.
Screenshot by Jack Wallen/ZDNET
Better yet, you don’t have to type the entire command. Let’s say, for example, that the command you were looking for was system controlYou could write systemcPress Tab and the rest of the command will be completed automatically.
Also: 5 Top-Tier Linux Distros for Power Users (or Anyone Looking for a Challenge)
This little trick works best if there are not so many commands that start with system (because for it to work system control You have to type all the letters except the last two. For example, if you use Samba (to share folders on your network), you could type smbc and press Tab to have everything people control Command completed for you.
How to use command history
1. Scroll through your command history
Do you remember the last command you typed? If it was a complicated command, you might not want to have to type it again. To avoid this, open your terminal window and press the up arrow on your keyboard. What you should see is the last command you ran. Press the up arrow again and you’ll see the previous command. Keep pressing the up arrow on your keyboard and you’ll review the entire saved history of commands you’ve issued.
2. Run a command from your history
When you find the command you want to run, stop on it and press Enter on your keyboard. That command will be executed as if you had just typed it. This trick is very useful when you don’t feel like typing complicated commands or can’t remember the exact command you had run previously.
Also: How to Use the Linux History Command and What It Can Do for You
To this day, I use these two tricks with Linux and they always help me make using the command line a little bit easier. Once you start using these useful tools, you will be less afraid of using the Linux CLI.