How do I view the man pages?

Solution 1:

To view a manual page related to a package, open a terminal (press Ctrl+Alt+T together) and type:

man <package_name>

For example, to view grep's manual page, type:

man grep

This will open the manual page referring to the section numbers in the order:

1 2 3 4 5 6 7 

If you want to open the manual page of a specific section, type:

man <section_number> <package_name>

For example, to open the manual page of the open() function in C, you should type:

man 2 open

More information:

  • Refer to the the manual page for man.

  • Search through Ubuntu Manpages at: http://manpages.ubuntu.com/.

Solution 2:

@Jobin answer is perfect, I always like to add more options so Op can know it.

If you want to redirect a command man to a txt file:

man <command> > /location/file (change location and the name of file )

Another thing I would like you to know:

When for example you type man ls, you will see LS (1) at the top, numbers mean:

 (1)     User Commands
 (2)     System Calls
 (3)     Library functions
 (4)     Devices
 (5)     File formats
 (6)     Games and Amusements
 (7)     Conventions and Miscellany
 (8)     System Administration and Priveledged Commands
 (L)     Local. Some programs install their man pages into this section instead 
 (N)     TCL commands

And if you want to view man pages on terminal I would prefer to use:

man <command> | less so you can view it as pages

For more options: man man

Solution 3:

If using unity you can also access thru the Dash via yelp & the manpages scope

Open Dash home, type in manpages:whatever, ex. manpages:bash

Available man's will be displayed, when clicked on open in help window

The bookmark option in help when opened this way is semi useful, could be better.

Solution 4:

You can also view man pages in a browser.

Install the man2html package using sudo apt-get install man2html and then navigate to http://localhost/cgi-bin/man/man2html

Solution 5:

You can use man package/command(name) and for more information about how man works try using man man