Ubuntu: Configurating man page to work like “man xxx”



Question:

I made a application in C. I wrote a manpage for this program and it's called something like edit.1. I "compiled"

groff -man -Tascii edit.1 | less  

Now I can start it like man ./edit.1 from the main project file of the application but I want to start it like

man edit  

I know that I just could put it into usr/local/share/man/man1 but the program will be used by many users who re installing the program on their own system. How can I set it up that every user can just input man edit?


Solution:1

Since by default /usr/local/share/man/ is in the MANPATH (see /etc/manpath.config), all users will be able to see it if you put it in that directory. However, do compress it first:

gzip edit.1  

Also, there is already one man page called "edit" (redirected to run-mailcap). This will not be a problem, since /usr/local/share/man takes precedence AFAIR, but you might want to call your program something else.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »