Search code examples
macosshellsocketsnetwork-programmingunix-socket

Why "man 7 socket" not work on Mac OSX?


I tried instead "man 2 socket" which gives me a very short description, while I suppose there should be much more if you type "man 7 socket" on Linux.

That's pretty strange. Any ideas ?


Solution

  • While they have many things in common architecturally, MacOS is not exactly the same thing as Linux.

    Under Linux, there are at least 10 different possible sections of man pages, including section 2 (for system calls) and section 7 (for "conventions & miscellany").

    "man 7 socket" is very specific to Linux distributions, and the description starts off "This manual page describes the Linux networking socket layer user interface.". While MacOS has a subset of some of the man pages that you'd find under Linux, MacOS does come with quite a bit more documentation than just man pages, including this Apple Network Programming Topics page which mentions sockets and socket streams.