43

In my university, I can do such things as:

  • man strlen
  • man strcpy
  • man msgget
  • man msgctl

and a nice manual page appears. On my PC I get

$ man strcat
No manual entry for strcat

Any help on how to get those documentation pages into my computer?

quack quixote
  • 42,186
  • 14
  • 105
  • 129
Manuel Araoz
  • 856
  • 2
  • 8
  • 15
  • Nowadays is easier, because the average computer is connected to the Internet. You can type "man foo" directly into google :-) – geek Feb 19 '10 at 05:15

6 Answers6

65

Install the manpages-dev and manpages-posix-dev (thanks ChristopheD) packages. You should be able to find them in synaptic, or type

apt-get install manpages-dev
apt-get install manpages-posix-dev

at the command line.

Artelius
  • 1,224
  • 9
  • 8
  • 17
    Or `apt-get install manpages-dev manpages-posix-dev`. Not doing thing the most efficient way drives my programmer OCD nuts. Sorry. – TJ L Oct 09 '09 at 19:05
  • On voidlinux, its the packages `man-pages-devel` and `man-pages-posix`. – Jérôme Radix May 31 '15 at 19:22
  • 3
    What is `manpages-posix-dev`? – CMCDragonkai Jul 28 '16 at 13:08
  • worked perfectly for me. I used to have all those manpages at hand. I have updated my OS version several times and never lost the man pages before. – user3629249 Mar 03 '17 at 09:14
  • @CMCDragonkai The `manpages-posix-dev` contains things like `man 3 accept` or `man 3 connect` which are handy if you are doing socket programming and what not. I am assuming that these are all of the system calls, but I am not sure. – Tim Feb 01 '21 at 02:27
9

For Fedora, you can install it using yum:

yum install man-pages libstdc++-docs
Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
Just a helper
  • 91
  • 1
  • 1
  • This answer is correct and should not have been voted down, since OP did not mention any distro. – Soumyadip DM Dec 03 '15 at 15:04
  • This also helped me for red hat. Thank you. – cokedude Aug 28 '19 at 18:58
  • 1
    @SoumyadipDM Looking at the edit history of the question shows the original title was "how to install man pages for C standard library functions in **Ubuntu**?" In fact, the title has always had Ubuntu in it. – Chai T. Rex Dec 16 '19 at 22:26
4

You may find glibc-doc package useful as well. From http://packages.ubuntu.com/jaunty/glibc-doc:

Contains The GNU C Library Reference manual in info and html format as well as the man pages for libpthread functions and the complete GNU C Library ChangeLog.

user7963
  • 1,487
  • 11
  • 8
3

On a ubuntu system they are in the packages

manpages-posix-dev (headers)
manpages-dev (functions)
ChristopheD
  • 6,232
  • 2
  • 15
  • 10
2

Ubuntu + others; You can also do a search in aptitude. I.e:

:~$ aptitude search manpages
i   asr-manpages          - alt.sysadmin.recovery manual pages
i   csound-manpages       - manual pages for csound
i   erlang-manpages       - Erlang/OTP manual pages
i   freebsd-manpages      - Manual pages for a GNU/kFreeBSD system
i   funny-manpages        - more funny manpages
i   gmt-manpages          - Manpages for the Generic Mapping Tools
i   manpages              - Manual pages about using a GNU/Linux system
p   manpages-cs           - Czech version of the manual pages
p   manpages-de           - German manpages
p   manpages-de-dev       - German development manpages
i   manpages-dev          - Manual pages about using GNU/Linux for development
p   manpages-es           - Spanish man pages
p   manpages-es-extra     - Spanish extra manpages
p   manpages-fr           - French version of the manual pages about using GNU/Linux
p   manpages-fr-dev       - French version of the development manual pages
...

Where "i" mean the package is installed and "p" means purged/not installed.

~$ man aptitude

And then i.e:

~$ sudo apt-get install manpages-es-extra

Other systems has similar functions.

Morpfh
  • 21
  • 2
1

It always annoys me about ubuntu that I have to go searching around for the man pages and info pages to load. Fedora installs docs by default. At least they seem to be looking at it: http://brainstorm.ubuntu.com/idea/10240/

pixelbeat
  • 1,220
  • 10
  • 6