How to find documentation within my own GNU / Linux system

Many of those new to the world GNU / Linux they are full of doubts and unable to find a quick answer to their concerns, sometimes they don't even have a connection through which to access a support forum and finally end up with the idea that Linux is very difficult for them.

Most of those who find themselves in this situation are unaware that our own system contains a good part of the answers to our initial concerns. There are essentially three sources of documentation in a system GNU / Linux: man pages, info pages and application manuals packaged in / usr / share / doc.

In this article we will detail each of these sources.


Man pages

The manual pages or "man pages" are the classic forms of reference documentation in Linux and Unix. Ideally, you can search the man pages for help for any command, configuration file, or library routine.

In practice, Linux is free software, and some pages have not been written or show their age. However, man pages are the first place to look when you need help. To access the man pages, just type Mon followed by the topic to be investigated.

A paging will be started, so you will press q when I finish reading. For example, to find information about the command ls, I would write:

$ man ls

Knowing the parts of the man pages it can be helpful to quickly jump to the information you need, you will find the following sections on the man page (Box 1):

Table 1: Manual Pages

NAME Command name and description
SYNOPSIS How to use the command
DESCRIPTION In-depth explanation of how the command works
EXAMPLES Suggestions on how to use the command
SEE ALSO Related topics (Usually in man pages)

Sections of the man pages

The files that comprise the man pages are stored in / usr / share / man (or in / usr / man on some old systems). Within that directory, you will find that the manual pages are organized into the following sections (Box 2).

Table 2: Sections of the manual pages

man1 User programs
man2 System calls
man3 Library functions
man4 Special files
man5 File format
man6 Games
man7 Miscellany

Multiple man pages

Some topics exist in more than one section. To demonstrate this, we are going to use the command whats, which shows all the man pages available for this topic:

$ what is printf
printf (1) - format and print data
printf (3) - formatted output conversion

In this case, man printf it would be on the page of section 1 (User programs). If we were to write a C program, we would be more interested in the page in section 3 (Library functions). You can call up a certain section of man pages by specifying it on the command line, so to ask for printf, we can write:

$man 3 printf

Finding the correct man page

Sometimes it is difficult to find a few man pages on a given topic. In that case, you could use man -k to find the NAME section of the man pages. Know that this is a substring search, so something like man -k ls would give you a lot of outputs, here is an example using a more specific word:

$ man -k whatis whatis (1) - prints manual page descriptions

All about apropos

The previous example brought us a few more points. First, the command about is exactly equivalent to man -k, (Actually, I'll give you a secret. When you run man -k actually run about behind the scenes).


The MANPATH line of code

We now turn to the second type of documentation that we will find in our GNU / Linux system. By default, the man program looks for the man pages in / usr / share / man, / usr / local / man, / usr / X11R6 / man and possibly / opt / man. sometimes you can find what you need by adding an additional path to the search path. That being the case, just edit /etc/man.conf in a text editor and add a line like the following:

MANPATH / opt / man

From here on, any man page in the directory / opt / man will be found. Remember you need to run again makewhatis to add these new man pages to the database whats.


GNU info

One of the shortcomings of manual pages is that they do not support hypertext so you cannot easily jump from one page to another. Friends of GNU recognize this flaw, so they invented another documentation format: "info" pages.

Many of the GNU programs come with extensive documentation in the info page format. You can start reading info pages with the command info:

In this way we will bring an index of all the info pages available in the system. You can move in them with the arrow keys, follow "links" (indicated with a star) using the Enter key and to exit by pressing q. The keys are based on Emacs, so it should be easy for you to navigate if you are familiar with that editor.

For more information with the use of info, read their info page. You should be able to navigate them using the keys mentioned above:

$ info info

/ usr / share / doc

There is one last source that can help you within Linux system. Many programs come equipped with additional documentation in other formats: text, PDF, PostScript, HTML, to name a few.

Take a look at / usr / share / doc (/ usr / doc on old systems). You will find a long list of directories, each of which comes with the applications on your system. Searching through this documentation can often reveal something interesting, such as tutorials or additional technical documentation. A quick check reveals a ton of material available to read:

$ cd / usr / share / doc
$ find. -type f | wc -l

In other articles we will refer to external sources of documentation such as The Linux Documentation Project (LDP), mailing lists and newsgroups.

Source: Article taken from GUTL and written by Maikel Llamaret Heredia. Links: https://blog.desdelinux.net, http://www.raybenjamin.com, http://forum.codecall.net, http://www.linfo.org http://www.esdebian.org


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   b1tblu3 said

    Good article, very useful, and indispensable. Thank you.

    Just one question, is there a way to put the man pages or info pages in Spanish?

    Greetings all.

    1.    elav said

      Sure, you have to install the manpages-en package

      1.    Mariano gaudix said

        Hello ELAV.
        I pass this information on to you.

        I am downloading I believe the WPS Office or KingSoft BETA for GNU / LINUX …… .that is, according to this article there is a KingSoft BETA for GNU / LINUX and it can be downloaded to test ..

        I leave you the links to download the Beta for GNU / LINUX

        CHINO Office is in DEB, RPM and TAR packages
        You can download it from this page.

        http://community.wps.cn/download/

        ...............................................................
        Other links for information

        http://mosayanvala.wordpress.com/tag/office-apps/
        ......................................................
        http://community.wps.cn/download/
        …………………….
        http://marcosbox.blogspot.com.ar/2013/03/wps-office-for-linux-la-suite-da.html

  2.   b1tblu3 said

    Very kind Elav. 😀 Thank you.

  3.   Marco said

    of those items that become indispensable. added to my bookmarks. I was unaware of most of the information, and now it turns out that it was just what I needed to clarify a question I have in Chakra. Thanks Elav

  4.   gerker said

    Good article! These types of publications are always very good to pull at any given moment.

    Thank you. 🙂

  5.   msx said

    Spectacular!!!
    This article should be part of the base articles for a section "New to GNU + Linux / BSD" or similar.

    1.    msx said

      Although there are classic users -especially those coming from the Slackware stick- who prefer a monochrome console output, I find it especially practical to use the 'most' pager because of the way it highlights the different sections of the manual pages in colors:
      http://i.imgur.com/trXGgUQ.png

      Another feature of most is that it can be used as a simple binary file viewer.
      To use it as the default pager (for example, replacing more or less) we can set the global variable:
      export PAGER = / usr / bin / most
      both for each user of the system separately -including r00t- and for all users globally.

  6.   Joaquin said

    It would be necessary to add how to search for a word within the "man" or "info" itself. We can find that help when we are inside them, pressing "h".

    For example in "man" we can search for a word with "/" and then use "n" or "N" to search forwards or backwards, respectively.

    In «info» we search with «s» and then forward with «}» and backwards with «{«

  7.   ferchmetal said

    Excellent documentation, thank you.

  8.   kike said

    Interesting, I only use the command "man" to dry, did not know the option to select pages and other options. As always good post and good information.