How do I print a Man Page?
Posted by Keith Elder | Posted in Linux, Programming | Posted on 11-10-2000
If you are like me, sometimes you need to actually print a man page for a certain command. Linux has a lot of built in documentation but sometimes it can be a little hard to get at. Use the following command to print out an online man page.
cd /usr/share/man/ and run zcat man.1.gz | groff -mandoc – > man.ps
lpr man.ps
Be sure that you have the package named “groff” installed. The location of your actuall man pages may be different as well. The above path is normally used in Debian Linux.
Updated 10/11/00
The following update was sent in by Steve Limkemann
“……a slightly easier, and more portable, way to print man pages is to use the command “man -t someManPage | lpr” without the quotes.”