Eren Akbulut's Blog

Unix Commands II - man

January 13th, 2021

Hello everyone, after I started the Unix Commands series with the cat command yesterday I thought it would be better if I explained the man command first. The man command is totally essential for exploring usages of many things in Unix world.

First let's dive in the man commands manual by running the command:

man man

on the terminal.

man-manual-unix

As you can see above there are many other sections in every manual, on the manual sections part we can see we can get the manuals of 8 different standards.

  • User Commands

  • System Calls

  • C Library Functions

  • Devices and Special Files

  • File Formats and Conventions

  • Games et. Al.

  • Miscellanea

  • System Administration tools and Deamons

I'll not walk you through the each standard with examples, instead I'll explain how can you use a manual to find what you want and which part indicates what exactly.


Compulsory Fields

No matter what type a manual you are looking for you can be certain about you'll see three parts.

  • Name: The name field only contains the name of the manual and a short description about the command or system call or whatever it is from the list above.

  • Synopsis: Even though synopsis exists in every manual what is contains really depends on what we are truly looking for. For example if the manual that we are reading belongs to a command then it can contain the arguments for the command, or if that's a system call it can contain the information about the header files. Let me show you what I'm talking about really quick.

chmod-commandschmod-system-call

Another thing as you can see the pictures above same name can be stand for 2 different uses, let's take chmod in hand. We have both a system call and a command called chmod, and the way of we call them also differs. By default if we don't pass any other arguments man opens the first manual for the given name. For example if we run the "man chmod" it will bring us Chmod(1) directly however if we need the system call chmod then we can simply run "man 2 chmod" which leads us the manual at picture 2.

To learn about the other appearances of same name you can take a look at the See Also section at the bottom, for example we can see chmod(2) in the see also part of chmod(1).

chmod-see-also

  • Description: In my understanding description can be described as the part where we see detail information in a manual, and if we are for example in the manual of a command we should expect the see the each argument we can use with the given command, or if we are in the manual of a system call we can expect to see the full capabilities of that system call.


For the sake of readability I'll just cut this post with the parts of man command that happens to seen in every type of Unix Manual. I can however mention about other section can be seen in a manual like; Return Values, Errors, Examples, See Also, Standards, History and so on and so forth.

I hope that small guide is helpful to you and you can now explore the manual more easily.


Until next time, take care of yourselves :)

This blog has been created by Eren Akbulut 2020