How to View Manual Pages in Ubuntu?

To view the manual page for a specific command in Ubuntu Linux, you use the man command followed by the name of the command you want to research. This article covers how to use the man command, how to navigate through the manual interface, and how to find specific sections or search for commands when you cannot remember their exact names.

Using the man Command

The man command is the standard interface for accessing the built-in reference manuals on Ubuntu. It provides detailed documentation on command syntax, available options, environment variables, and usage examples.

To open a manual page, open your terminal and type man followed by the target command:

man ls

Running this example opens the manual page for the ls (list directory contents) command, displaying its full documentation directly in your terminal window.

The manual viewer uses a terminal pager (typically less) to display content. You can navigate through the text using the following keyboard shortcuts:

Searching Within a Manual Page

If you are looking for a specific option or keyword inside a long manual page, you can search the text dynamically:

  1. Press the forward slash key (/) while the manual is open.
  2. Type the keyword or flag you want to find (for example, /recursive).
  3. Press Enter to execute the search.
  4. Press N to move to the next match, or Shift + N to move to the previous match.

Finding Commands by Keyword

If you do not know the exact name of the command you need, you can search the short descriptions of all manual pages using the -k option (which functions similarly to the apropos command).

man -k "copy"

This output displays a list of all commands related to the word “copy”, helping you identify the exact command name before viewing its specific manual page.