Reading the built-in documentation (man)

This recipe shows how to read the man page of the fortune command using the man command.

The "official" Raspbian Linux distribution comes with a large amount of documentation built into the system. There are three primary sources of built-in documentation: man pages, Info documents, and the /usr/share/docs directory.

After completing this recipe, you will able to read the man page documentation built in for the Raspberry Pi.

Getting ready

The following are the ingredients:

  • A Raspberry Pi with a 5V power supply
  • An installed and configured "official" Raspbian Linux SD card

If the Raspberry Pi is connected to a network, and its Secure Shell server is running, this recipe can be completed remotely using a Secure Shell client.

How to do it...

The steps for reading the built-in documentation using man are as follows:

  1. Log in to the Raspberry Pi either directly or remotely.
  2. Execute the following command:
    man fortune
    
    How to do it...

    The preceding screenshot shows the man page for the fortune command.

  3. Press Space to page through the manual.

    Press h for a list of the key commands used for reading and searching.

    Press q to quit.

How it works…

Most command-line utilities have a man page. There are also man pages for configuration files and software libraries. All the man pages are accessible using the man command.

For more information, use the man command to read its own man page as follows:

man man

There's more...

It is also possible to search the library of man pages using the apropos command (or the –k option of the man command). The apropos command searches the man pages database for keywords and returns a list of man pages.

There's more...

In the preceding screenshot, the apropos command (man –k) found the man page for pianobar when searching for the keyword music.

See also

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.156.140