What do the numbers in a man page mean? The 2019 Stack Overflow Developer Survey Results Are InWhat is the significance of the “1” in ls(1)?What does the “(8)” in fsck(8) mean?Man -f what does the (1) stand for?What does the number mean in a man page?man pages: meaning of '2' in STAT(2)?What is the reason for having numbers within the brackets of a function ?What means the “integer argument” in system call descriptions?what is the significance of the “7” in “man 7 regex”?What is the meaning of the number part of man pages?What does the number mean in 'ls(1)', 'stat(3)' and 'apt(8)'?What does the number mean in a man page?Man folders and MANPATHWhat are the numbers after program names in Linux/GNU documentation?Generate man page in realtime?man pages: meaning of '2' in STAT(2)?View a man page in a specific sectionWhy does no command advise the user to consult a man page on incorrect usage?Man -f what does the (1) stand for?Repeated values for errno in man pageMan page for file permission numbers
Is bread bad for ducks?
What does "fetching by region is not available for SAM files" means?
What does ひと匙 mean in this manga and has it been used colloquially?
Can someone be penalized for an "unlawful" act if no penalty is specified?
Are there any other methods to apply to solving simultaneous equations?
Multiply Two Integer Polynomials
Why didn't the Event Horizon Telescope team mention Sagittarius A*?
Falsification in Math vs Science
Why did Acorn's A3000 have red function keys?
Why isn't airport relocation done gradually?
Is there a symbol for a right arrow with a square in the middle?
Return to UK after being refused entry years previously
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
Why is the maximum length of OpenWrt’s root password 8 characters?
Identify This Plant (Flower)
Who coined the term "madman theory"?
Deal with toxic manager when you can't quit
How to support a colleague who finds meetings extremely tiring?
What tool would a Roman-age civilization have for the breaking of silver and other metals into dust?
Am I thawing this London Broil safely?
The difference between dialogue marks
What is the meaning of the verb "bear" in this context?
What does Linus Torvalds mean when he says that Git "never ever" tracks a file?
Apparent duplicates between Haynes service instructions and MOT
What do the numbers in a man page mean?
The 2019 Stack Overflow Developer Survey Results Are InWhat is the significance of the “1” in ls(1)?What does the “(8)” in fsck(8) mean?Man -f what does the (1) stand for?What does the number mean in a man page?man pages: meaning of '2' in STAT(2)?What is the reason for having numbers within the brackets of a function ?What means the “integer argument” in system call descriptions?what is the significance of the “7” in “man 7 regex”?What is the meaning of the number part of man pages?What does the number mean in 'ls(1)', 'stat(3)' and 'apt(8)'?What does the number mean in a man page?Man folders and MANPATHWhat are the numbers after program names in Linux/GNU documentation?Generate man page in realtime?man pages: meaning of '2' in STAT(2)?View a man page in a specific sectionWhy does no command advise the user to consult a man page on incorrect usage?Man -f what does the (1) stand for?Repeated values for errno in man pageMan page for file permission numbers
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
So, for example, when I type man ls
I see LS(1)
. But if I type man apachectl
I see APACHECTL(8)
and if I type man cd
I end up with cd(n)
.
I'm wondering what the significance of the numbers in the parentheses are, if they have any.
man
add a comment |
So, for example, when I type man ls
I see LS(1)
. But if I type man apachectl
I see APACHECTL(8)
and if I type man cd
I end up with cd(n)
.
I'm wondering what the significance of the numbers in the parentheses are, if they have any.
man
11
Version on Super User: What do the parentheses and number after a Linux command or C function mean?
– Peter Mortensen
Jun 16 '11 at 3:33
3
stackoverflow.com/questions/62936/…
– Paul Tomblin
Apr 11 '12 at 22:05
4
@PeterMortensen This is why SuperUser and Unix/Linux and ServerFault and AskUbuntu and Apple all need to be merged.
– Chloe
Jan 25 '17 at 2:33
On a side note, you can set your own search order withexport MANSECT=0p:1:2:3:3p:4:5:6:7:8:9:l:s:n
– meuh
Nov 20 '18 at 12:30
add a comment |
So, for example, when I type man ls
I see LS(1)
. But if I type man apachectl
I see APACHECTL(8)
and if I type man cd
I end up with cd(n)
.
I'm wondering what the significance of the numbers in the parentheses are, if they have any.
man
So, for example, when I type man ls
I see LS(1)
. But if I type man apachectl
I see APACHECTL(8)
and if I type man cd
I end up with cd(n)
.
I'm wondering what the significance of the numbers in the parentheses are, if they have any.
man
man
asked Oct 28 '10 at 21:25
WilduckWilduck
2,2973116
2,2973116
11
Version on Super User: What do the parentheses and number after a Linux command or C function mean?
– Peter Mortensen
Jun 16 '11 at 3:33
3
stackoverflow.com/questions/62936/…
– Paul Tomblin
Apr 11 '12 at 22:05
4
@PeterMortensen This is why SuperUser and Unix/Linux and ServerFault and AskUbuntu and Apple all need to be merged.
– Chloe
Jan 25 '17 at 2:33
On a side note, you can set your own search order withexport MANSECT=0p:1:2:3:3p:4:5:6:7:8:9:l:s:n
– meuh
Nov 20 '18 at 12:30
add a comment |
11
Version on Super User: What do the parentheses and number after a Linux command or C function mean?
– Peter Mortensen
Jun 16 '11 at 3:33
3
stackoverflow.com/questions/62936/…
– Paul Tomblin
Apr 11 '12 at 22:05
4
@PeterMortensen This is why SuperUser and Unix/Linux and ServerFault and AskUbuntu and Apple all need to be merged.
– Chloe
Jan 25 '17 at 2:33
On a side note, you can set your own search order withexport MANSECT=0p:1:2:3:3p:4:5:6:7:8:9:l:s:n
– meuh
Nov 20 '18 at 12:30
11
11
Version on Super User: What do the parentheses and number after a Linux command or C function mean?
– Peter Mortensen
Jun 16 '11 at 3:33
Version on Super User: What do the parentheses and number after a Linux command or C function mean?
– Peter Mortensen
Jun 16 '11 at 3:33
3
3
stackoverflow.com/questions/62936/…
– Paul Tomblin
Apr 11 '12 at 22:05
stackoverflow.com/questions/62936/…
– Paul Tomblin
Apr 11 '12 at 22:05
4
4
@PeterMortensen This is why SuperUser and Unix/Linux and ServerFault and AskUbuntu and Apple all need to be merged.
– Chloe
Jan 25 '17 at 2:33
@PeterMortensen This is why SuperUser and Unix/Linux and ServerFault and AskUbuntu and Apple all need to be merged.
– Chloe
Jan 25 '17 at 2:33
On a side note, you can set your own search order with
export MANSECT=0p:1:2:3:3p:4:5:6:7:8:9:l:s:n
– meuh
Nov 20 '18 at 12:30
On a side note, you can set your own search order with
export MANSECT=0p:1:2:3:3p:4:5:6:7:8:9:l:s:n
– meuh
Nov 20 '18 at 12:30
add a comment |
8 Answers
8
active
oldest
votes
The number corresponds to what section of the manual that page is from; 1 is user commands, while 8 is sysadmin stuff. The man page for man itself (man man
) explains it and lists the standard ones:
MANUAL SECTIONS
The standard sections of the manual include:
1 User Commands
2 System Calls
3 C Library Functions
4 Devices and Special Files
5 File Formats and Conventions
6 Games et. al.
7 Miscellanea
8 System Administration tools and Daemons
Distributions customize the manual section to their specifics,
which often include additional sections.
There are certain terms that have different pages in different sections (e.g. printf
as a command appears in section 1, as a stdlib
function appears in section 3); in cases like that you can pass the section number to man
before the page name to choose which one you want, or use man -a
to show every matching page in a row:
$ man 1 printf
$ man 3 printf
$ man -a printf
You can tell what sections a term falls in with man -k
(equivalent to the apropos
command). It will do substring matches too (e.g. it will show sprintf
if you run man -k printf
), so you need to use ^term
to limit it:
$ man -k '^printf'
printf (1) - format and print data
printf (1p) - write formatted output
printf (3) - formatted output conversion
printf (3p) - print formatted output
printf [builtins] (1) - bash built-in commands, see bash(1)
5
That certainly explains it. Is there an easy way of telling whether or not there are multiple man pages for a given command?
– Wilduck
Oct 28 '10 at 21:46
2
@Wil Yes, edited
– Michael Mrozek♦
Oct 28 '10 at 21:52
10
Note that these section numbers are for Linux. 1, 3 and 6 are the same across all unix variants AFAIK, but the others and the non-lone-digit sections can differ. Usuallyman X intro
describes what is in sectionX
.
– Gilles
Oct 28 '10 at 22:31
2
@KeithB: I've used some unices with different 4,5,7,8. Digital Unix (OSF1) had, and Solaris still has: file formats in 4, misc in 5, devices in 7. Solaris also puts administrator commands in 1m. I think system calls in 2 is universal, but some systems also have some C library interfaces in 2 (when they're supposed to be thin wrappers around the eponymous syscall).
– Gilles
Oct 29 '10 at 20:20
3
Huh, who'da thought you'd need a manual to use a manual... Never have I ever executedman man
... until now.
– Matt Clark
Dec 4 '15 at 15:44
|
show 5 more comments
The history of these section numbers goes back to the original Unix Programmer's Manual by Thompson and Ritchie in 1971.
The original sections were
- Commands
- System calls
- Subroutines
- Special files
- File formats
- User-maintained programs
- Miscellaneous
More stuff from the 70ies, indeed. I thought it was from the 80ies.
– Rolf
Feb 10 '18 at 18:51
"Miscellaneous" primarily means "broad information about an entire subsystem or generic Unix feature rather than a particular API endpoint." See for examplepipe(7)
,tcp(7)
(and several other networking man pages),pthreads(7)
,boot(7)
,regex(7)
, etc. There's other stuff in section 7 as well, such asascii(7)
(ASCII table) andman(7)
(how to write a man page) but the broad docs pages are by far the most useful things in section 7 in my experience.
– Kevin
Dec 7 '18 at 18:27
add a comment |
konqueror also describes non-standard sections: (thanks to @greg0ire for the idea)
0 Header files
0p Header files (POSIX)
1 Executable programs or shell commands
1p Executable programs or shell commands (POSIX)
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
3n Network Functions
3p Perl Modules
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
l Local documentation
n New manpages
add a comment |
What it's means already described, but I also wants to add that each section has special manual page with introduction: intro
. For example, see man 1 intro
or man 3 intro
and so on.
1
I don't see this on my Fedora install. Is man X intro not standard?
– beatgammit
Jul 1 '11 at 4:39
@tjameson Do you haveman-pages
package installed?
– php-coder
Jul 1 '11 at 4:43
add a comment |
From the man
manpage:
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 conven‐
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
As to why they're separate like that -- there's some overlap. Certain manpages exist in more than one section depending on what you mean.
For instance, compare man crontab
with man 5 crontab
-- chances are the latter is the one you meant to look up.
And what areman1p
andman3p
?
– Tyilo
Aug 4 '11 at 20:15
And where should I place my own manpages located in~/man
?
– Tyilo
Aug 4 '11 at 20:20
I knew there were different numbers, but I didn't know there was a rhyme to it. Thanks
– user606723
Aug 4 '11 at 20:28
1
1p is the posix standard version of the manual. If you want to write portable code, you should use only Xp man pages. If you implementation is non posix compliant X and Xp man pages could differ.
– andcoz
Aug 4 '11 at 22:42
@Tyilo see my answer
– Babken Vardanyan
Jun 23 '14 at 6:36
add a comment |
These are section numbers.
Just type man man
or open konqueror and type man://man and you'll see what are these sections.
add a comment |
Often, a man page is referenced via suffixing it with the section enclosed in parentheses, e.g.:
read(2)
This style has two main advantages:
- it is immediately clear that you reference a man page - i.e. you can write something like 'cf. read(3)' instead of 'cf. the section 3 man page of read'
- if multiple sections contain man pages with the same name, specifying the section is more precise
Man pages are organized in sections, e.g. Section 1 includes all user command man pages, Section 2 all man pages for the system calls, Section 3 is for library functions etc.
On the command line, if you don't explicitly specify the section you get the first matching man page, in the default section traversal order, e.g.:
$ man read
displays BASH_BUILTINS(1)
on Fedora. Where
$ man 2 read
displays the man page for the read()
system call.
Note that the positional specification of the section is not portable - e.g. on Solaris you would specify it like this:
$ man -s 2 read
Usually, man man
also lists some of the available sections. But not necessarily all. For listing all available sections one may list the subdirectories of all directories listed in the default man path or the environment variable $MANPATH
. For example on a Fedora 23 system with some development packages installed /usr/share/man
has following subdirectories:
cs es id man0p man2 man3x man5x man7x man9x pt_BR sk zh_CN
da fr it man1 man2x man4 man6 man8 mann pt_PT sv zh_TW
de hr ja man1p man3 man4x man6x man8x pl ro tr
en hu ko man1x man3p man5 man7 man9 pt ru zh
The directories with the man
prefix represent each section - while the other ones contain translated sections. Thus, to get a list of non-empty sections one could issue a command like this:
$ find /usr/share/man -type f | sed 's@^.*/man(..*)/.*$@1@'
| sort -u | column
0p 1p 3 4 6 8
1 2 3p 5 7
(the sections ending with p
are POSIX man pages)
To view a man page in another language (if available) one can set a language related environment variable, e.g.:
$ LC_MESSAGES=de_DE man read
Also, each section should have an introduction man page named intro
, e.g. viewable via:
$ man 2 intro
add a comment |
The definitions for SVr4 are:
1 User Commands
2 System Calls
3 library Functions
4 File Formats
5 Standards, Environment and Macros (e.g. man(5))
6 Games and Demos
7 Device and Network Interfaces, Special Files
8 Maintenance Procedures
9 Kernel and Driver entry points and structures
These is the actual numbering for a "genetic" UNIX.
POSIX does not define numbers.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f3586%2fwhat-do-the-numbers-in-a-man-page-mean%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
The number corresponds to what section of the manual that page is from; 1 is user commands, while 8 is sysadmin stuff. The man page for man itself (man man
) explains it and lists the standard ones:
MANUAL SECTIONS
The standard sections of the manual include:
1 User Commands
2 System Calls
3 C Library Functions
4 Devices and Special Files
5 File Formats and Conventions
6 Games et. al.
7 Miscellanea
8 System Administration tools and Daemons
Distributions customize the manual section to their specifics,
which often include additional sections.
There are certain terms that have different pages in different sections (e.g. printf
as a command appears in section 1, as a stdlib
function appears in section 3); in cases like that you can pass the section number to man
before the page name to choose which one you want, or use man -a
to show every matching page in a row:
$ man 1 printf
$ man 3 printf
$ man -a printf
You can tell what sections a term falls in with man -k
(equivalent to the apropos
command). It will do substring matches too (e.g. it will show sprintf
if you run man -k printf
), so you need to use ^term
to limit it:
$ man -k '^printf'
printf (1) - format and print data
printf (1p) - write formatted output
printf (3) - formatted output conversion
printf (3p) - print formatted output
printf [builtins] (1) - bash built-in commands, see bash(1)
5
That certainly explains it. Is there an easy way of telling whether or not there are multiple man pages for a given command?
– Wilduck
Oct 28 '10 at 21:46
2
@Wil Yes, edited
– Michael Mrozek♦
Oct 28 '10 at 21:52
10
Note that these section numbers are for Linux. 1, 3 and 6 are the same across all unix variants AFAIK, but the others and the non-lone-digit sections can differ. Usuallyman X intro
describes what is in sectionX
.
– Gilles
Oct 28 '10 at 22:31
2
@KeithB: I've used some unices with different 4,5,7,8. Digital Unix (OSF1) had, and Solaris still has: file formats in 4, misc in 5, devices in 7. Solaris also puts administrator commands in 1m. I think system calls in 2 is universal, but some systems also have some C library interfaces in 2 (when they're supposed to be thin wrappers around the eponymous syscall).
– Gilles
Oct 29 '10 at 20:20
3
Huh, who'da thought you'd need a manual to use a manual... Never have I ever executedman man
... until now.
– Matt Clark
Dec 4 '15 at 15:44
|
show 5 more comments
The number corresponds to what section of the manual that page is from; 1 is user commands, while 8 is sysadmin stuff. The man page for man itself (man man
) explains it and lists the standard ones:
MANUAL SECTIONS
The standard sections of the manual include:
1 User Commands
2 System Calls
3 C Library Functions
4 Devices and Special Files
5 File Formats and Conventions
6 Games et. al.
7 Miscellanea
8 System Administration tools and Daemons
Distributions customize the manual section to their specifics,
which often include additional sections.
There are certain terms that have different pages in different sections (e.g. printf
as a command appears in section 1, as a stdlib
function appears in section 3); in cases like that you can pass the section number to man
before the page name to choose which one you want, or use man -a
to show every matching page in a row:
$ man 1 printf
$ man 3 printf
$ man -a printf
You can tell what sections a term falls in with man -k
(equivalent to the apropos
command). It will do substring matches too (e.g. it will show sprintf
if you run man -k printf
), so you need to use ^term
to limit it:
$ man -k '^printf'
printf (1) - format and print data
printf (1p) - write formatted output
printf (3) - formatted output conversion
printf (3p) - print formatted output
printf [builtins] (1) - bash built-in commands, see bash(1)
5
That certainly explains it. Is there an easy way of telling whether or not there are multiple man pages for a given command?
– Wilduck
Oct 28 '10 at 21:46
2
@Wil Yes, edited
– Michael Mrozek♦
Oct 28 '10 at 21:52
10
Note that these section numbers are for Linux. 1, 3 and 6 are the same across all unix variants AFAIK, but the others and the non-lone-digit sections can differ. Usuallyman X intro
describes what is in sectionX
.
– Gilles
Oct 28 '10 at 22:31
2
@KeithB: I've used some unices with different 4,5,7,8. Digital Unix (OSF1) had, and Solaris still has: file formats in 4, misc in 5, devices in 7. Solaris also puts administrator commands in 1m. I think system calls in 2 is universal, but some systems also have some C library interfaces in 2 (when they're supposed to be thin wrappers around the eponymous syscall).
– Gilles
Oct 29 '10 at 20:20
3
Huh, who'da thought you'd need a manual to use a manual... Never have I ever executedman man
... until now.
– Matt Clark
Dec 4 '15 at 15:44
|
show 5 more comments
The number corresponds to what section of the manual that page is from; 1 is user commands, while 8 is sysadmin stuff. The man page for man itself (man man
) explains it and lists the standard ones:
MANUAL SECTIONS
The standard sections of the manual include:
1 User Commands
2 System Calls
3 C Library Functions
4 Devices and Special Files
5 File Formats and Conventions
6 Games et. al.
7 Miscellanea
8 System Administration tools and Daemons
Distributions customize the manual section to their specifics,
which often include additional sections.
There are certain terms that have different pages in different sections (e.g. printf
as a command appears in section 1, as a stdlib
function appears in section 3); in cases like that you can pass the section number to man
before the page name to choose which one you want, or use man -a
to show every matching page in a row:
$ man 1 printf
$ man 3 printf
$ man -a printf
You can tell what sections a term falls in with man -k
(equivalent to the apropos
command). It will do substring matches too (e.g. it will show sprintf
if you run man -k printf
), so you need to use ^term
to limit it:
$ man -k '^printf'
printf (1) - format and print data
printf (1p) - write formatted output
printf (3) - formatted output conversion
printf (3p) - print formatted output
printf [builtins] (1) - bash built-in commands, see bash(1)
The number corresponds to what section of the manual that page is from; 1 is user commands, while 8 is sysadmin stuff. The man page for man itself (man man
) explains it and lists the standard ones:
MANUAL SECTIONS
The standard sections of the manual include:
1 User Commands
2 System Calls
3 C Library Functions
4 Devices and Special Files
5 File Formats and Conventions
6 Games et. al.
7 Miscellanea
8 System Administration tools and Daemons
Distributions customize the manual section to their specifics,
which often include additional sections.
There are certain terms that have different pages in different sections (e.g. printf
as a command appears in section 1, as a stdlib
function appears in section 3); in cases like that you can pass the section number to man
before the page name to choose which one you want, or use man -a
to show every matching page in a row:
$ man 1 printf
$ man 3 printf
$ man -a printf
You can tell what sections a term falls in with man -k
(equivalent to the apropos
command). It will do substring matches too (e.g. it will show sprintf
if you run man -k printf
), so you need to use ^term
to limit it:
$ man -k '^printf'
printf (1) - format and print data
printf (1p) - write formatted output
printf (3) - formatted output conversion
printf (3p) - print formatted output
printf [builtins] (1) - bash built-in commands, see bash(1)
edited Jul 31 '16 at 13:54
NoOneIsHere
1035
1035
answered Oct 28 '10 at 21:32
Michael Mrozek♦Michael Mrozek
62.4k29194214
62.4k29194214
5
That certainly explains it. Is there an easy way of telling whether or not there are multiple man pages for a given command?
– Wilduck
Oct 28 '10 at 21:46
2
@Wil Yes, edited
– Michael Mrozek♦
Oct 28 '10 at 21:52
10
Note that these section numbers are for Linux. 1, 3 and 6 are the same across all unix variants AFAIK, but the others and the non-lone-digit sections can differ. Usuallyman X intro
describes what is in sectionX
.
– Gilles
Oct 28 '10 at 22:31
2
@KeithB: I've used some unices with different 4,5,7,8. Digital Unix (OSF1) had, and Solaris still has: file formats in 4, misc in 5, devices in 7. Solaris also puts administrator commands in 1m. I think system calls in 2 is universal, but some systems also have some C library interfaces in 2 (when they're supposed to be thin wrappers around the eponymous syscall).
– Gilles
Oct 29 '10 at 20:20
3
Huh, who'da thought you'd need a manual to use a manual... Never have I ever executedman man
... until now.
– Matt Clark
Dec 4 '15 at 15:44
|
show 5 more comments
5
That certainly explains it. Is there an easy way of telling whether or not there are multiple man pages for a given command?
– Wilduck
Oct 28 '10 at 21:46
2
@Wil Yes, edited
– Michael Mrozek♦
Oct 28 '10 at 21:52
10
Note that these section numbers are for Linux. 1, 3 and 6 are the same across all unix variants AFAIK, but the others and the non-lone-digit sections can differ. Usuallyman X intro
describes what is in sectionX
.
– Gilles
Oct 28 '10 at 22:31
2
@KeithB: I've used some unices with different 4,5,7,8. Digital Unix (OSF1) had, and Solaris still has: file formats in 4, misc in 5, devices in 7. Solaris also puts administrator commands in 1m. I think system calls in 2 is universal, but some systems also have some C library interfaces in 2 (when they're supposed to be thin wrappers around the eponymous syscall).
– Gilles
Oct 29 '10 at 20:20
3
Huh, who'da thought you'd need a manual to use a manual... Never have I ever executedman man
... until now.
– Matt Clark
Dec 4 '15 at 15:44
5
5
That certainly explains it. Is there an easy way of telling whether or not there are multiple man pages for a given command?
– Wilduck
Oct 28 '10 at 21:46
That certainly explains it. Is there an easy way of telling whether or not there are multiple man pages for a given command?
– Wilduck
Oct 28 '10 at 21:46
2
2
@Wil Yes, edited
– Michael Mrozek♦
Oct 28 '10 at 21:52
@Wil Yes, edited
– Michael Mrozek♦
Oct 28 '10 at 21:52
10
10
Note that these section numbers are for Linux. 1, 3 and 6 are the same across all unix variants AFAIK, but the others and the non-lone-digit sections can differ. Usually
man X intro
describes what is in section X
.– Gilles
Oct 28 '10 at 22:31
Note that these section numbers are for Linux. 1, 3 and 6 are the same across all unix variants AFAIK, but the others and the non-lone-digit sections can differ. Usually
man X intro
describes what is in section X
.– Gilles
Oct 28 '10 at 22:31
2
2
@KeithB: I've used some unices with different 4,5,7,8. Digital Unix (OSF1) had, and Solaris still has: file formats in 4, misc in 5, devices in 7. Solaris also puts administrator commands in 1m. I think system calls in 2 is universal, but some systems also have some C library interfaces in 2 (when they're supposed to be thin wrappers around the eponymous syscall).
– Gilles
Oct 29 '10 at 20:20
@KeithB: I've used some unices with different 4,5,7,8. Digital Unix (OSF1) had, and Solaris still has: file formats in 4, misc in 5, devices in 7. Solaris also puts administrator commands in 1m. I think system calls in 2 is universal, but some systems also have some C library interfaces in 2 (when they're supposed to be thin wrappers around the eponymous syscall).
– Gilles
Oct 29 '10 at 20:20
3
3
Huh, who'da thought you'd need a manual to use a manual... Never have I ever executed
man man
... until now.– Matt Clark
Dec 4 '15 at 15:44
Huh, who'da thought you'd need a manual to use a manual... Never have I ever executed
man man
... until now.– Matt Clark
Dec 4 '15 at 15:44
|
show 5 more comments
The history of these section numbers goes back to the original Unix Programmer's Manual by Thompson and Ritchie in 1971.
The original sections were
- Commands
- System calls
- Subroutines
- Special files
- File formats
- User-maintained programs
- Miscellaneous
More stuff from the 70ies, indeed. I thought it was from the 80ies.
– Rolf
Feb 10 '18 at 18:51
"Miscellaneous" primarily means "broad information about an entire subsystem or generic Unix feature rather than a particular API endpoint." See for examplepipe(7)
,tcp(7)
(and several other networking man pages),pthreads(7)
,boot(7)
,regex(7)
, etc. There's other stuff in section 7 as well, such asascii(7)
(ASCII table) andman(7)
(how to write a man page) but the broad docs pages are by far the most useful things in section 7 in my experience.
– Kevin
Dec 7 '18 at 18:27
add a comment |
The history of these section numbers goes back to the original Unix Programmer's Manual by Thompson and Ritchie in 1971.
The original sections were
- Commands
- System calls
- Subroutines
- Special files
- File formats
- User-maintained programs
- Miscellaneous
More stuff from the 70ies, indeed. I thought it was from the 80ies.
– Rolf
Feb 10 '18 at 18:51
"Miscellaneous" primarily means "broad information about an entire subsystem or generic Unix feature rather than a particular API endpoint." See for examplepipe(7)
,tcp(7)
(and several other networking man pages),pthreads(7)
,boot(7)
,regex(7)
, etc. There's other stuff in section 7 as well, such asascii(7)
(ASCII table) andman(7)
(how to write a man page) but the broad docs pages are by far the most useful things in section 7 in my experience.
– Kevin
Dec 7 '18 at 18:27
add a comment |
The history of these section numbers goes back to the original Unix Programmer's Manual by Thompson and Ritchie in 1971.
The original sections were
- Commands
- System calls
- Subroutines
- Special files
- File formats
- User-maintained programs
- Miscellaneous
The history of these section numbers goes back to the original Unix Programmer's Manual by Thompson and Ritchie in 1971.
The original sections were
- Commands
- System calls
- Subroutines
- Special files
- File formats
- User-maintained programs
- Miscellaneous
edited Dec 9 '15 at 3:17
Gilles
547k13011131628
547k13011131628
answered Oct 29 '10 at 13:39
KeithBKeithB
2,6391412
2,6391412
More stuff from the 70ies, indeed. I thought it was from the 80ies.
– Rolf
Feb 10 '18 at 18:51
"Miscellaneous" primarily means "broad information about an entire subsystem or generic Unix feature rather than a particular API endpoint." See for examplepipe(7)
,tcp(7)
(and several other networking man pages),pthreads(7)
,boot(7)
,regex(7)
, etc. There's other stuff in section 7 as well, such asascii(7)
(ASCII table) andman(7)
(how to write a man page) but the broad docs pages are by far the most useful things in section 7 in my experience.
– Kevin
Dec 7 '18 at 18:27
add a comment |
More stuff from the 70ies, indeed. I thought it was from the 80ies.
– Rolf
Feb 10 '18 at 18:51
"Miscellaneous" primarily means "broad information about an entire subsystem or generic Unix feature rather than a particular API endpoint." See for examplepipe(7)
,tcp(7)
(and several other networking man pages),pthreads(7)
,boot(7)
,regex(7)
, etc. There's other stuff in section 7 as well, such asascii(7)
(ASCII table) andman(7)
(how to write a man page) but the broad docs pages are by far the most useful things in section 7 in my experience.
– Kevin
Dec 7 '18 at 18:27
More stuff from the 70ies, indeed. I thought it was from the 80ies.
– Rolf
Feb 10 '18 at 18:51
More stuff from the 70ies, indeed. I thought it was from the 80ies.
– Rolf
Feb 10 '18 at 18:51
"Miscellaneous" primarily means "broad information about an entire subsystem or generic Unix feature rather than a particular API endpoint." See for example
pipe(7)
, tcp(7)
(and several other networking man pages), pthreads(7)
, boot(7)
, regex(7)
, etc. There's other stuff in section 7 as well, such as ascii(7)
(ASCII table) and man(7)
(how to write a man page) but the broad docs pages are by far the most useful things in section 7 in my experience.– Kevin
Dec 7 '18 at 18:27
"Miscellaneous" primarily means "broad information about an entire subsystem or generic Unix feature rather than a particular API endpoint." See for example
pipe(7)
, tcp(7)
(and several other networking man pages), pthreads(7)
, boot(7)
, regex(7)
, etc. There's other stuff in section 7 as well, such as ascii(7)
(ASCII table) and man(7)
(how to write a man page) but the broad docs pages are by far the most useful things in section 7 in my experience.– Kevin
Dec 7 '18 at 18:27
add a comment |
konqueror also describes non-standard sections: (thanks to @greg0ire for the idea)
0 Header files
0p Header files (POSIX)
1 Executable programs or shell commands
1p Executable programs or shell commands (POSIX)
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
3n Network Functions
3p Perl Modules
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
l Local documentation
n New manpages
add a comment |
konqueror also describes non-standard sections: (thanks to @greg0ire for the idea)
0 Header files
0p Header files (POSIX)
1 Executable programs or shell commands
1p Executable programs or shell commands (POSIX)
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
3n Network Functions
3p Perl Modules
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
l Local documentation
n New manpages
add a comment |
konqueror also describes non-standard sections: (thanks to @greg0ire for the idea)
0 Header files
0p Header files (POSIX)
1 Executable programs or shell commands
1p Executable programs or shell commands (POSIX)
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
3n Network Functions
3p Perl Modules
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
l Local documentation
n New manpages
konqueror also describes non-standard sections: (thanks to @greg0ire for the idea)
0 Header files
0p Header files (POSIX)
1 Executable programs or shell commands
1p Executable programs or shell commands (POSIX)
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
3n Network Functions
3p Perl Modules
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
l Local documentation
n New manpages
answered Jun 23 '14 at 6:27
Babken VardanyanBabken Vardanyan
515715
515715
add a comment |
add a comment |
What it's means already described, but I also wants to add that each section has special manual page with introduction: intro
. For example, see man 1 intro
or man 3 intro
and so on.
1
I don't see this on my Fedora install. Is man X intro not standard?
– beatgammit
Jul 1 '11 at 4:39
@tjameson Do you haveman-pages
package installed?
– php-coder
Jul 1 '11 at 4:43
add a comment |
What it's means already described, but I also wants to add that each section has special manual page with introduction: intro
. For example, see man 1 intro
or man 3 intro
and so on.
1
I don't see this on my Fedora install. Is man X intro not standard?
– beatgammit
Jul 1 '11 at 4:39
@tjameson Do you haveman-pages
package installed?
– php-coder
Jul 1 '11 at 4:43
add a comment |
What it's means already described, but I also wants to add that each section has special manual page with introduction: intro
. For example, see man 1 intro
or man 3 intro
and so on.
What it's means already described, but I also wants to add that each section has special manual page with introduction: intro
. For example, see man 1 intro
or man 3 intro
and so on.
edited Dec 3 '14 at 10:10
answered May 6 '11 at 5:18
php-coderphp-coder
54944
54944
1
I don't see this on my Fedora install. Is man X intro not standard?
– beatgammit
Jul 1 '11 at 4:39
@tjameson Do you haveman-pages
package installed?
– php-coder
Jul 1 '11 at 4:43
add a comment |
1
I don't see this on my Fedora install. Is man X intro not standard?
– beatgammit
Jul 1 '11 at 4:39
@tjameson Do you haveman-pages
package installed?
– php-coder
Jul 1 '11 at 4:43
1
1
I don't see this on my Fedora install. Is man X intro not standard?
– beatgammit
Jul 1 '11 at 4:39
I don't see this on my Fedora install. Is man X intro not standard?
– beatgammit
Jul 1 '11 at 4:39
@tjameson Do you have
man-pages
package installed?– php-coder
Jul 1 '11 at 4:43
@tjameson Do you have
man-pages
package installed?– php-coder
Jul 1 '11 at 4:43
add a comment |
From the man
manpage:
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 conven‐
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
As to why they're separate like that -- there's some overlap. Certain manpages exist in more than one section depending on what you mean.
For instance, compare man crontab
with man 5 crontab
-- chances are the latter is the one you meant to look up.
And what areman1p
andman3p
?
– Tyilo
Aug 4 '11 at 20:15
And where should I place my own manpages located in~/man
?
– Tyilo
Aug 4 '11 at 20:20
I knew there were different numbers, but I didn't know there was a rhyme to it. Thanks
– user606723
Aug 4 '11 at 20:28
1
1p is the posix standard version of the manual. If you want to write portable code, you should use only Xp man pages. If you implementation is non posix compliant X and Xp man pages could differ.
– andcoz
Aug 4 '11 at 22:42
@Tyilo see my answer
– Babken Vardanyan
Jun 23 '14 at 6:36
add a comment |
From the man
manpage:
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 conven‐
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
As to why they're separate like that -- there's some overlap. Certain manpages exist in more than one section depending on what you mean.
For instance, compare man crontab
with man 5 crontab
-- chances are the latter is the one you meant to look up.
And what areman1p
andman3p
?
– Tyilo
Aug 4 '11 at 20:15
And where should I place my own manpages located in~/man
?
– Tyilo
Aug 4 '11 at 20:20
I knew there were different numbers, but I didn't know there was a rhyme to it. Thanks
– user606723
Aug 4 '11 at 20:28
1
1p is the posix standard version of the manual. If you want to write portable code, you should use only Xp man pages. If you implementation is non posix compliant X and Xp man pages could differ.
– andcoz
Aug 4 '11 at 22:42
@Tyilo see my answer
– Babken Vardanyan
Jun 23 '14 at 6:36
add a comment |
From the man
manpage:
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 conven‐
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
As to why they're separate like that -- there's some overlap. Certain manpages exist in more than one section depending on what you mean.
For instance, compare man crontab
with man 5 crontab
-- chances are the latter is the one you meant to look up.
From the man
manpage:
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 conven‐
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
As to why they're separate like that -- there's some overlap. Certain manpages exist in more than one section depending on what you mean.
For instance, compare man crontab
with man 5 crontab
-- chances are the latter is the one you meant to look up.
answered Aug 4 '11 at 19:57
ShadurShadur
20.1k84658
20.1k84658
And what areman1p
andman3p
?
– Tyilo
Aug 4 '11 at 20:15
And where should I place my own manpages located in~/man
?
– Tyilo
Aug 4 '11 at 20:20
I knew there were different numbers, but I didn't know there was a rhyme to it. Thanks
– user606723
Aug 4 '11 at 20:28
1
1p is the posix standard version of the manual. If you want to write portable code, you should use only Xp man pages. If you implementation is non posix compliant X and Xp man pages could differ.
– andcoz
Aug 4 '11 at 22:42
@Tyilo see my answer
– Babken Vardanyan
Jun 23 '14 at 6:36
add a comment |
And what areman1p
andman3p
?
– Tyilo
Aug 4 '11 at 20:15
And where should I place my own manpages located in~/man
?
– Tyilo
Aug 4 '11 at 20:20
I knew there were different numbers, but I didn't know there was a rhyme to it. Thanks
– user606723
Aug 4 '11 at 20:28
1
1p is the posix standard version of the manual. If you want to write portable code, you should use only Xp man pages. If you implementation is non posix compliant X and Xp man pages could differ.
– andcoz
Aug 4 '11 at 22:42
@Tyilo see my answer
– Babken Vardanyan
Jun 23 '14 at 6:36
And what are
man1p
and man3p
?– Tyilo
Aug 4 '11 at 20:15
And what are
man1p
and man3p
?– Tyilo
Aug 4 '11 at 20:15
And where should I place my own manpages located in
~/man
?– Tyilo
Aug 4 '11 at 20:20
And where should I place my own manpages located in
~/man
?– Tyilo
Aug 4 '11 at 20:20
I knew there were different numbers, but I didn't know there was a rhyme to it. Thanks
– user606723
Aug 4 '11 at 20:28
I knew there were different numbers, but I didn't know there was a rhyme to it. Thanks
– user606723
Aug 4 '11 at 20:28
1
1
1p is the posix standard version of the manual. If you want to write portable code, you should use only Xp man pages. If you implementation is non posix compliant X and Xp man pages could differ.
– andcoz
Aug 4 '11 at 22:42
1p is the posix standard version of the manual. If you want to write portable code, you should use only Xp man pages. If you implementation is non posix compliant X and Xp man pages could differ.
– andcoz
Aug 4 '11 at 22:42
@Tyilo see my answer
– Babken Vardanyan
Jun 23 '14 at 6:36
@Tyilo see my answer
– Babken Vardanyan
Jun 23 '14 at 6:36
add a comment |
These are section numbers.
Just type man man
or open konqueror and type man://man and you'll see what are these sections.
add a comment |
These are section numbers.
Just type man man
or open konqueror and type man://man and you'll see what are these sections.
add a comment |
These are section numbers.
Just type man man
or open konqueror and type man://man and you'll see what are these sections.
These are section numbers.
Just type man man
or open konqueror and type man://man and you'll see what are these sections.
answered Oct 28 '10 at 21:33
greg0iregreg0ire
1,30621432
1,30621432
add a comment |
add a comment |
Often, a man page is referenced via suffixing it with the section enclosed in parentheses, e.g.:
read(2)
This style has two main advantages:
- it is immediately clear that you reference a man page - i.e. you can write something like 'cf. read(3)' instead of 'cf. the section 3 man page of read'
- if multiple sections contain man pages with the same name, specifying the section is more precise
Man pages are organized in sections, e.g. Section 1 includes all user command man pages, Section 2 all man pages for the system calls, Section 3 is for library functions etc.
On the command line, if you don't explicitly specify the section you get the first matching man page, in the default section traversal order, e.g.:
$ man read
displays BASH_BUILTINS(1)
on Fedora. Where
$ man 2 read
displays the man page for the read()
system call.
Note that the positional specification of the section is not portable - e.g. on Solaris you would specify it like this:
$ man -s 2 read
Usually, man man
also lists some of the available sections. But not necessarily all. For listing all available sections one may list the subdirectories of all directories listed in the default man path or the environment variable $MANPATH
. For example on a Fedora 23 system with some development packages installed /usr/share/man
has following subdirectories:
cs es id man0p man2 man3x man5x man7x man9x pt_BR sk zh_CN
da fr it man1 man2x man4 man6 man8 mann pt_PT sv zh_TW
de hr ja man1p man3 man4x man6x man8x pl ro tr
en hu ko man1x man3p man5 man7 man9 pt ru zh
The directories with the man
prefix represent each section - while the other ones contain translated sections. Thus, to get a list of non-empty sections one could issue a command like this:
$ find /usr/share/man -type f | sed 's@^.*/man(..*)/.*$@1@'
| sort -u | column
0p 1p 3 4 6 8
1 2 3p 5 7
(the sections ending with p
are POSIX man pages)
To view a man page in another language (if available) one can set a language related environment variable, e.g.:
$ LC_MESSAGES=de_DE man read
Also, each section should have an introduction man page named intro
, e.g. viewable via:
$ man 2 intro
add a comment |
Often, a man page is referenced via suffixing it with the section enclosed in parentheses, e.g.:
read(2)
This style has two main advantages:
- it is immediately clear that you reference a man page - i.e. you can write something like 'cf. read(3)' instead of 'cf. the section 3 man page of read'
- if multiple sections contain man pages with the same name, specifying the section is more precise
Man pages are organized in sections, e.g. Section 1 includes all user command man pages, Section 2 all man pages for the system calls, Section 3 is for library functions etc.
On the command line, if you don't explicitly specify the section you get the first matching man page, in the default section traversal order, e.g.:
$ man read
displays BASH_BUILTINS(1)
on Fedora. Where
$ man 2 read
displays the man page for the read()
system call.
Note that the positional specification of the section is not portable - e.g. on Solaris you would specify it like this:
$ man -s 2 read
Usually, man man
also lists some of the available sections. But not necessarily all. For listing all available sections one may list the subdirectories of all directories listed in the default man path or the environment variable $MANPATH
. For example on a Fedora 23 system with some development packages installed /usr/share/man
has following subdirectories:
cs es id man0p man2 man3x man5x man7x man9x pt_BR sk zh_CN
da fr it man1 man2x man4 man6 man8 mann pt_PT sv zh_TW
de hr ja man1p man3 man4x man6x man8x pl ro tr
en hu ko man1x man3p man5 man7 man9 pt ru zh
The directories with the man
prefix represent each section - while the other ones contain translated sections. Thus, to get a list of non-empty sections one could issue a command like this:
$ find /usr/share/man -type f | sed 's@^.*/man(..*)/.*$@1@'
| sort -u | column
0p 1p 3 4 6 8
1 2 3p 5 7
(the sections ending with p
are POSIX man pages)
To view a man page in another language (if available) one can set a language related environment variable, e.g.:
$ LC_MESSAGES=de_DE man read
Also, each section should have an introduction man page named intro
, e.g. viewable via:
$ man 2 intro
add a comment |
Often, a man page is referenced via suffixing it with the section enclosed in parentheses, e.g.:
read(2)
This style has two main advantages:
- it is immediately clear that you reference a man page - i.e. you can write something like 'cf. read(3)' instead of 'cf. the section 3 man page of read'
- if multiple sections contain man pages with the same name, specifying the section is more precise
Man pages are organized in sections, e.g. Section 1 includes all user command man pages, Section 2 all man pages for the system calls, Section 3 is for library functions etc.
On the command line, if you don't explicitly specify the section you get the first matching man page, in the default section traversal order, e.g.:
$ man read
displays BASH_BUILTINS(1)
on Fedora. Where
$ man 2 read
displays the man page for the read()
system call.
Note that the positional specification of the section is not portable - e.g. on Solaris you would specify it like this:
$ man -s 2 read
Usually, man man
also lists some of the available sections. But not necessarily all. For listing all available sections one may list the subdirectories of all directories listed in the default man path or the environment variable $MANPATH
. For example on a Fedora 23 system with some development packages installed /usr/share/man
has following subdirectories:
cs es id man0p man2 man3x man5x man7x man9x pt_BR sk zh_CN
da fr it man1 man2x man4 man6 man8 mann pt_PT sv zh_TW
de hr ja man1p man3 man4x man6x man8x pl ro tr
en hu ko man1x man3p man5 man7 man9 pt ru zh
The directories with the man
prefix represent each section - while the other ones contain translated sections. Thus, to get a list of non-empty sections one could issue a command like this:
$ find /usr/share/man -type f | sed 's@^.*/man(..*)/.*$@1@'
| sort -u | column
0p 1p 3 4 6 8
1 2 3p 5 7
(the sections ending with p
are POSIX man pages)
To view a man page in another language (if available) one can set a language related environment variable, e.g.:
$ LC_MESSAGES=de_DE man read
Also, each section should have an introduction man page named intro
, e.g. viewable via:
$ man 2 intro
Often, a man page is referenced via suffixing it with the section enclosed in parentheses, e.g.:
read(2)
This style has two main advantages:
- it is immediately clear that you reference a man page - i.e. you can write something like 'cf. read(3)' instead of 'cf. the section 3 man page of read'
- if multiple sections contain man pages with the same name, specifying the section is more precise
Man pages are organized in sections, e.g. Section 1 includes all user command man pages, Section 2 all man pages for the system calls, Section 3 is for library functions etc.
On the command line, if you don't explicitly specify the section you get the first matching man page, in the default section traversal order, e.g.:
$ man read
displays BASH_BUILTINS(1)
on Fedora. Where
$ man 2 read
displays the man page for the read()
system call.
Note that the positional specification of the section is not portable - e.g. on Solaris you would specify it like this:
$ man -s 2 read
Usually, man man
also lists some of the available sections. But not necessarily all. For listing all available sections one may list the subdirectories of all directories listed in the default man path or the environment variable $MANPATH
. For example on a Fedora 23 system with some development packages installed /usr/share/man
has following subdirectories:
cs es id man0p man2 man3x man5x man7x man9x pt_BR sk zh_CN
da fr it man1 man2x man4 man6 man8 mann pt_PT sv zh_TW
de hr ja man1p man3 man4x man6x man8x pl ro tr
en hu ko man1x man3p man5 man7 man9 pt ru zh
The directories with the man
prefix represent each section - while the other ones contain translated sections. Thus, to get a list of non-empty sections one could issue a command like this:
$ find /usr/share/man -type f | sed 's@^.*/man(..*)/.*$@1@'
| sort -u | column
0p 1p 3 4 6 8
1 2 3p 5 7
(the sections ending with p
are POSIX man pages)
To view a man page in another language (if available) one can set a language related environment variable, e.g.:
$ LC_MESSAGES=de_DE man read
Also, each section should have an introduction man page named intro
, e.g. viewable via:
$ man 2 intro
edited Jul 8 '16 at 17:59
answered Jul 1 '16 at 23:14
maxschlepzigmaxschlepzig
34.7k33141214
34.7k33141214
add a comment |
add a comment |
The definitions for SVr4 are:
1 User Commands
2 System Calls
3 library Functions
4 File Formats
5 Standards, Environment and Macros (e.g. man(5))
6 Games and Demos
7 Device and Network Interfaces, Special Files
8 Maintenance Procedures
9 Kernel and Driver entry points and structures
These is the actual numbering for a "genetic" UNIX.
POSIX does not define numbers.
add a comment |
The definitions for SVr4 are:
1 User Commands
2 System Calls
3 library Functions
4 File Formats
5 Standards, Environment and Macros (e.g. man(5))
6 Games and Demos
7 Device and Network Interfaces, Special Files
8 Maintenance Procedures
9 Kernel and Driver entry points and structures
These is the actual numbering for a "genetic" UNIX.
POSIX does not define numbers.
add a comment |
The definitions for SVr4 are:
1 User Commands
2 System Calls
3 library Functions
4 File Formats
5 Standards, Environment and Macros (e.g. man(5))
6 Games and Demos
7 Device and Network Interfaces, Special Files
8 Maintenance Procedures
9 Kernel and Driver entry points and structures
These is the actual numbering for a "genetic" UNIX.
POSIX does not define numbers.
The definitions for SVr4 are:
1 User Commands
2 System Calls
3 library Functions
4 File Formats
5 Standards, Environment and Macros (e.g. man(5))
6 Games and Demos
7 Device and Network Interfaces, Special Files
8 Maintenance Procedures
9 Kernel and Driver entry points and structures
These is the actual numbering for a "genetic" UNIX.
POSIX does not define numbers.
answered Sep 27 '15 at 10:51
schilyschily
10.9k31744
10.9k31744
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f3586%2fwhat-do-the-numbers-in-a-man-page-mean%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
11
Version on Super User: What do the parentheses and number after a Linux command or C function mean?
– Peter Mortensen
Jun 16 '11 at 3:33
3
stackoverflow.com/questions/62936/…
– Paul Tomblin
Apr 11 '12 at 22:05
4
@PeterMortensen This is why SuperUser and Unix/Linux and ServerFault and AskUbuntu and Apple all need to be merged.
– Chloe
Jan 25 '17 at 2:33
On a side note, you can set your own search order with
export MANSECT=0p:1:2:3:3p:4:5:6:7:8:9:l:s:n
– meuh
Nov 20 '18 at 12:30