When reading man pages I often see the command name followed by a (1)
. bat
in particular has made the point of making their headline A cat(1) clone with syntax highlighting and Git integration.
I wonder what the (1)
means? And if is there a circumstance it could be another number?
Do man man
and you will be enlightened. The numbers you mention refer to the section of the whole of the manual pages.
From man man
:
The table below shows the section numbers of the manual followed by the types of pages they contain.
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
The manual pages are organised by section. To see the entire list, try man man
. Here is a snippet.
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
Something like printf
might have entries in multiple sections of the man pages. Here is an example
% man -k '^printf$'
printf (1) - format and print data
printf (3) - formatted output conversion
You can see that there are two manual pages for printf
- one in section 1
and the other in section 3
. The short hand representation for "printf in section 1 of the man pages" is printf(1)
. You can request this specific page by doing man 1 printf
or do man -a printf
to get all the pages one after another.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.