Search code examples
manpage

How do you view a man page you just created?


Suppose I have a man page, which I just wrote and passed through nroff -man, called command.1

How do I view it with man now? I looked though the man man page, and maybe I missed it, but I didn't see anything. I also searched google.

Is it only possible to view using nroff -man? Is there a command line option for man to view that specific file? Is it necessary to modify MANPATH?


Solution

  • Put the command.1 man page in a new folder called man1. Then, assuming you're in the folder containing the new man1 folder, call the man command like this:

    man -M . command
    

    Replace the dot by the path to the folder containing the man1 folder if you're located elsewhere.