I had heard this question a lot of time and also seen people struggling to take the printout of Linux man pages, instead of the fact that it is one of the very simplest task.

This can be done in a series of steps or in one single steps. I will be explaining both here.

Converting man page into text files:

# man passwd | col -b > passwd.txt

This will create a passwd.txt file which can be printed easily.

Taking Printout of text file:

You can take the printout of the text file by using any of the following commands:

# cat passwd.txt | lpr

OR

# lpr passwd.txt

One liner command:

You can also use this one liner command to take the printout of the man page:

# man passwd | col -b | lpr

You can also print “info” pages with the same procedure:

# info passwd | col -b | lpr

Create PDF:

If you would like to create a pdf of man pages then that can also be done by this simple command:

# man -t passwd | ps2pdf - passwd.pdf

If you enjoyed this post, make sure you subscribe to my RSS feed!!!!