4

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.

3
  • 6
    Does your version of man really indicate you can use the -m option to specify a remote host? That would normally allow you to specify an alternate operating system whose manual pages are installed on the same host (historically via nfs mount) along with manual pages for your current active operating system. Dec 26, 2017 at 15:47
  • it thought about that but it was confusing for me, so i needed clarification; it still remains somewhat confusing - to specify an alternative os as a/for directory to search manpages in, if i understand correctly
    – user86041
    Dec 26, 2017 at 16:09
  • excellent, to note, i had to escape the asterisk /* in zsh
    – user86041
    Dec 26, 2017 at 16:21

1 Answer 1

13

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
(...)
1
  • Having ssh open a TTY would be convenient: ssh -t ..., then man will start a pager.
    – muru
    Dec 27, 2017 at 3:50

You must log in to answer this question.