Linux / Unix: View Overlapping Man Page With Same Names

I am a new Unix / Linux user. I am using whatis command to find man pages. But, I noticed that some man pages have a common names. For example, when I run whatis 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)

How do I access overlapping man pages and what is the meaning of (1), (1p), (3), and so on?


Tutorial details
Difficulty level Easy
Root privileges No
Requirements None
Est. reading time 5m
[/donotprint]All man pages are divided into sections. Usually, Linux or Unix-like operating systems has eight or nine sections. Each man page arise in only one section. The standard sections of the manual include (taken from my CentOS 6.x server):
  • Section #1 : User Commands
  • Section #2 : System Calls
  • Section #3 : C Library Functions
  • Section #4 : Devices and Special Files
  • Section #5 : File Formats and Conventions
  • Section #6 : Games et. Al.
  • Section #7 : Miscellanea
  • Section #8 : System Administration tools and Deamons

Many Linux distributions and other Unix variants customize the manual section to their specifics, which often include additional sections. For example, section #9 may include kernel internals and more.

What is the meaning of number in parentheses after the command?

It’s the section of the manual the man page is in. For example, useradd(8) means:

  1. useradd – Name of the command.
  2. 8 – The section (“System Administration tools and Deamons”) where the command is documented.

For example, ls(1) means:

  1. ls – Name of the command.
  2. 1 – The section (“user commands”) where the command is documented.

Fig.01: What those numbers after command names were, as in ls(1)?

Syntax: Viewing man pages

There are manual pages by the same name in different sections, referring to different things. The syntax is:

man page-to-view
man section page-to-view

To read printf(1) command manual that format and print data, enter:
$ man 1 printf
To read printf(3) programmers printf() manual, enter:
$ man 3 printf

Finding what function a command or API performs

Type the following to looks up a given command, system call, library function, or special file name, as specified by the command parameter:

whatis command
whatis ls

Sample outputs:

ls                   (1)  - list directory contents
ls                   (1p)  - list directory contents

The 1p and 3p refer to sections letters as follows (taken from my IBM AIX Unix server):

C	Specifies commands (including system management commands).
F	Specifies file-type manual pages.
L	Specifies library functions.
n	Specifies new.
l	Specifies local.
o	Specifies old.
p	Specifies public.

Please note that p section letter as in ls(1p) on GNU based systems indicates that you are viewing “POSIX Programmer’s Manual”. For more information see the following man page:
man 1 man

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Paul Korir May 17, 2013 @ 10:53

    I think the ‘p’ in ‘1p’ refers to POSIX-compliant. For more on POSIX check out the Wikipedia article.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum