History of UNIX Manpages

21 points by cve


zie

I think the biggest thing most people maybe don’t know about man, is you can create your own sections and make your own man pages. Unfortunately actually doing this is a bit more complicated than it should be, as not every system has a consistent version of man, so you have to read your man’s manpath page(man manpath) and figure out how to do it.

For me it’s editing ~/.manpath on most linux/etc and editing /usr/local/etc/man.d/*.conf on macos.

generally it’s as simple as adding a line like MANPATH /home/zie/man or something like that.

The directory and file structure inside of your own manpath is something like this:

man<section>/<name>.<section>

So if you wanted a command ‘hi’ in section 1 where user commands go:

mkdir -p ~/man/man1

vi ~/man/man1/hi.1

The format is probably mandoc: https://mandoc.bsd.lv/mdoc/ but just plain text works surprisingly well. but again, every system can be a bit different.

Who needs notes and stuff, when you can have your own man pages :)