Wednesday, November 2, 2011

Read Ubuntu man pages in Firefox


Everyone who uses Linux has sometime used man pages. They are an exceptional source of myriad of Linux command flags. So to get details about the ls command, we type at terminal

man ls

The output in terminal is plain text and not easy to navigate (at least for few).
It would be really nice to have the main page available in proper format in the browser. One can then also open as many browser tabs and navigate through multiple command info easily.

This can be enabled in Firefox as following
  1. Install man2html. In the Terminal type the following command and enter your password when prompted.

    sudo apt-get install man2html

  2. Go to Firefox > Ctrl+B.
  3. Right click on any bookmark folder and create a New Bookmark.
  4. Enter Name as man (Put anything you would like to see this bookmark as).
  5. Enter Location as
    http://localhost/cgi-bin/man/man2html?query=%s
  6. Enter Keyword as man (this is the command you want to type in address bar).
  7. Click the Add button.
  8. Now in the Firefox address bar type your man command as you would do in a terminal to see nicely formatted man page in the browser.
    man ls


No comments:

Post a Comment