Linux – How to read man pages from a remote machine

linuxmanremote

Reading man man indicate that the -m switch or its counterpart the --systems long switch may be used to specify a remote host to get man pages from.

The page also mentions the SYSTEM environment variable to be used for the same purpose.

Apparently simply specifying a remote IP address as an argument to the switch isn't enough to achieve such a convenience.

I'd like to have more elaboration and real examples that would make one to read FreeBSD man pages on Linux for instance.

Best Answer

As already stated in the comments, I don't really believe that -m can display manpages from a remote machine. To display a manpage from a remote machine you need something like:

$ ssh freebsd  'man man'
MAN(1)                  FreeBSD General Commands Manual                 MAN(1)

NAME
     man -- display online manual documentation pages
(...)

or mount a part of the remote system using nfs as already suggested.

The -m you're asking about makes man look for manpages for other systems on the local system. For example:

$ mkdir -p /usr/man/bsd/man1
$ scp freebsd:/usr/share/man/man1/man.1.gz /usr/man/bsd/man1
$ man -m bsd man
MAN(1)      BSD General Commands Manual                                                                                                                                                              

NAME
     man — display online manual documentation pages
(...)
$ man man
MAN(1)    Manual pager utils                                                                                                                                                                            

NAME
       man - an interface to the on-line reference manuals
(...)
Related Question