Linux Mint – Reading manual pages with the man command

How to Install Windows Server 2019

So far, you’ve learned several very useful commands to form the basis of your terminal skills. However, we haven’t yet gone over the most important command of all—the man command.

The most important skill that any Linux administrator will ever learn is how to find useful information when in a jam. Being resourceful in the face of disaster is what separates hobbyists from professionals. In today’s age, there’s a wealth of information available at your fingertips. When faced with a nasty error message, often a quick Google search will find an online posting where someone has already been through the same problem and may have typed a response indicating what the solution is. In the worst case scenario, you may stumble across a bug report instead and discover that your problem is a known issue, and the developers of the software are already working on resolving it.

When you don’t have the comfort of an Internet browser by your side or you’d like to quickly look up some details on a specific command, ask the man. The man command (short for manual) is one of your biggest allies in the Linux world. Knowing how to use it will help make you resourceful. You’d be surprised how much information the man command can provide. To use it, all you have to do is execute the man command and use another shell command as an argument. After you are done, simply press q on your keyboard to exit.

For example, try executing the man command against the ls command, as follows:


man ls

The following screenshot shows the output of the man command:

As you can see, there is much more to the ls command than what has been discussed in this chapter. There are many arguments that you can pass along to the ls command to change the way the results are displayed. For example, from the man entry for ls, you will discover that you can pass the -a argument to ls (so the command becomes ls -a) to view hidden files along with the rest of the output.

Note

Files or directories that begin with periods, also known as dot files, are hidden. These files will neither show up in the normal ls output in the shell nor will they appear in the Nemo file manager unless you explicitly configure it to show hidden files. As mentioned in the man page for ls, you can use the -a flag to show hidden files, or you can view hidden files in Nemo by enabling Show Hidden Files in the View menu. Try this in your home directory, and you will see that there are many more files there than you might have thought.

Feel free to try the man command against other commands and view the output. In fact, you can even discover more about the man command itself by executing it:


man man

However, not all commands have manual entries. For example, you can try the following command:


man cd

However, it won’t work. The manual entry for the cd command is not included in Linux Mint. Feel free to give the man command a try and see what manual entries you’re able to come up with.

Comments are closed.