Learning new things can be overwhelming and the Linux terminal is no exception. When it comes to mastering the command-line terminal, the key is to understand the underlying concepts rather than memorizing commands.
Most commands in Linux are well documented and to really understand them well all you need is the command terminal itself.
This guide takes a look at some of the most important Linux commands that will help you to get help on Linux Commands from the command-line and to enhance your learning on your way to mastering Linux commands.
Why Use the Command-Line?
If you are used to using Graphical User Interfaces (GUI), you might be wondering: why should I use the command-line if I can access everything in the GUI? The truth is that the command-line gives you more control and flexibility to change or manage your system.
Take for example the task of adding a new user to the system, this is the GUI interface that you are provided with.
If you were to do the same task using the command-line, you could use the following command.
sudo useradd muo -p Azb3tDEM,aH8
A very simple command that can easily be automated. Plus, you can add more options as you create the user like set the expiry date for the password, add the user group, or set the default home directory of the user, etc.
The other advantage is that you can use the same command on any Linux distro, and even other operating systems like Mac OS and Unix. Meanwhile, the GUI implementation will be different between the different Linux distros or operating systems.
1. Apropos
There are many Linux commands and you possibly can't recall all of them. If you do not know what command to use for a certain task, the apropos command is your friend.
Let's assume you want to copy a file but do not know which command to use. Simply use the apropos command followed by the task you want to complete.
To check copy commands, use
apropos copy
Apropos will list several commands that match the keyword you used. The list includes a short description of what the command does. From the output below, the highlighted command is what you are looking for to copy files or directories.
The word apropos is derived from the French word "à propos" which means "about."
The apropos command works by looking through the entire description sections of the man pages for the matching keyword you provide with the apropos command.