Here’s a quick way to convert any man page into a PDF document for easier viewing, searching, and sharing:
# install necessary package
sudo apt-get install ghostscript
# script to convert a man page into a PDF
man -t tmux | ps2pdf - tmux.pdf
After you create the PDF document, use your PDF viewer of choice.
I’m using Windows Subsystem for Linux (WSL), so I call Adobe Acrobat directly to open the PDF:
/mnt/c/Program\ Files/Adobe/Acrobat\ DC/Acrobat/Acrobat.exe tmux.pdf
But I also created a symbolic link to Acrobat.exe, then called it that way:
# create symbolic link 'adobe' to 'Acrobat.exe'
ln -s /mnt/c/Program\ Files/Adobe/Acrobat\ DC/Acrobat/Acrobat.exe /bin/adobe
# view 'tmux.pdf'
adobe tmux.pdf
