Ubuntu Linux install development / system library functions man pages (manual)

Posted on in Categories Debian Linux, Tip of the day, Troubleshooting, Ubuntu Linux last updated July 30, 2007

I am little surprised to find that Ubuntu Linux skips development man pages by default on cloud-based images. A quick search using apt-cache pointed out that I need to install the manpages-dev package on a Ubuntu Linux. It includes manual pages about using GNU/Linux for development. The manpages-posix-dev package includes manual pages about using a POSIX system for development. The man-db package is the on-line manual page i.e. actual man command to view man pages on a Ubuntu or Debian Linux.

Install development man pages on Ubuntu/Debian Linux

Type the following apt-get command to install various packages to view man pages for C standard library functions in Ubuntu or Debian system:
$ sudo apt-get install manpages-dev man-db manpages-posix-dev
Sample outputs:

Fig.01: Installing man pages on a Ubuntu or Debian Linux system
Fig.01: Installing man pages on a Ubuntu or Debian Linux system

How do I view man pages?

To view library calls (functions within program libraries), enter:
$ man 3 function-name
$ man 3 putc
$ man 3 strlen
$ man 3 printf
$ man 3 scanf
$ man 2 execve
$ man 2 fork

The number 3 or 2 indicates the section numbers of the manual as follows:

  • 2 : System calls (functions provided by the kernel)
  • 3 : Library calls (functions within program libraries)

See man page sections for more info:
$ man man

See also

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

8 comment

  1. Gutsy Gibbon:

    [email protected]:~# apt-get install manpages-dev
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Package manpages-dev is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package manpages-dev has no installation candidate

    🙁

    This linux not windows. No man pages? Completely unacceptable.

Leave a Comment