Man pages - custom
Create directory structure[top]
> mkdir -p /mystuff/share/man
Decide on a root directory where you would like to store your man files.
It's a good idea to seperate the custom man files off from the system man files.
This way the custom man files have their own location and will be easier to maintain.
Here we chose /mystuff/share/man.
> mkdir /mystuff/share/man/man1
> mkdir /mystuff/share/man/man2
> mkdir /mystuff/share/man/man3
> mkdir /mystuff/share/man/man4
> mkdir /mystuff/share/man/man5
> mkdir /mystuff/share/man/man6
> mkdir /mystuff/share/man/man7
> mkdir /mystuff/share/man/man8
> mkdir /mystuff/share/man/man9
Create all of the man subdirectories for each possible manual section number.
Each man file will be stored in its respective man section number directory.
Setup environment[top]
> vi /etc/profile
setenv PATH "${PATH}:/mystuff/share/man"
You'll need to edit the $PATH environmental variable so the shell will know where the custom man files are located.
Edit the /etc/profile file and append onto the existing $PATH settings.
This will enable all user's shells to locate these files when they are called upon.
Make man page[top]
Grab this man page file first.
Edit it and name it program.1.
Then copy it to its respective man directory. This will be man1.
> cp program.1 /mystuff/share/man/man1
Now a user can access this by typing "man program" or "man 1 program" (default).
Tutorials






