The best command of all GNU / Linux according to me

Title more than provocative 😛 and as always, very personal comment. But with a bit of luck finishing reading this post, some of you will want to try it from now on;). I know you want to know what the name of the best command is, but I'm not going to tell you yet 😛 Wait for a bit of history first.

The magic of the internet

Image result for how they build things before stack overflow

If you don't recognize this symbol, you probably haven't been very involved in the world of software development. Nowadays, this is a reference point for any type of question related not only to programming, there are many very interesting topics. (I am quite involved in the Linux & Unix community myself).

As expected, this brings great productivity advantages, since in a matter of seconds you can find the solution to a problem that if it had not been solved and displayed on the page, it would have taken you hours, or maybe days, to solve (eye that this is nothing bad at all).

The problem

With these advantages of today, a big problem has arisen. Knowledge is turning atomic. What do I mean by this? Well, join me in my deliberation.

The other day I wanted to go buy a good Spanish programming book (I didn't have a name in mind, I just wanted to see if there was something good). As expected in my country, I don't know if the same will happen in yours. Computer-related books were on the smallest and most hidden shelf in the library. What's more, they were so hidden that when I got to the one with the "Computer Science" sign, I was surprised that they were philosophy books. I had to ask one of the guys who were working there, he looked at me strangely, and showed me a shelf full of books that apparently did not sell very often.

Among some of the specimens I could find, there was a super modern Word 2003, PowerPoint 2003, Corel x3 ... even books of Android y Swift They were so out of date that it wasn't worth skipping past the book cover. Not that I am against these books, but the truth is that I did not imagine buying any of these, much less reading one to the end ...

The biggest problem

But this can't be a cause ... I really doubt it. The reason for this escapes what is seen with the naked eye in bookstores, but it is something quite evident if we reflect a little. The programadores Today, they do not read. This is a sad reality, that thanks to magic of the internet, it is becoming more general all over the world.

It is true that at the rate at which technology grows and develops, getting books is somewhat complicated, languages ​​are always being renewed, or frameworks are changing. What can we do about it? Well this is my personal solution.

The deciding factor

In the more than 30 years that software has existed, what is it that has never changed in the least? Simple, the main element, the man. If we think about it for a second, you'll see what I mean; he man it has always been there, regardless of the language; he man it has always been there, regardless of the hardware. He man is the one who has defined the concepts major on development.

Some time ago I bought a book called OPERATING SYSTEMS, a concept-based approach de DM Dhamdhere. Although the book was published in 2008, many of the concepts seem so relevant to me today that I consider that much of what I know of operating systems is based on this beautiful (and somewhat extensive) copy.

How does this affect?

Well, all this explanation has had a reason and reason for being. My favorite command has been sidelined for many of the past few years by this new way of investigating things. Because before the internet at the scale we are on now, there had to be a way to discover all these ins and outs of everyday life.

For all the curious, I ask you to execute the following command:

apropos -s 1,2,3,4,5,6,7,8 a

I guarantee you have seen many lines pass before your eyes. And for those who have seen absolutely nothing, they must first run

mandb

After a short wait they will be able to carry out the previous command and see the long list of information.

Mon

At this point in the post there is no need to hide the name of my favorite program 🙂

And is that just let me quote a little reference from your same manual page

Own. Christopher Diaz Riveros

This section is quite interesting, as we can see, there is a clear definition of the types of manuals that exist. My favorites are in group 8 and 3. But surely you are asking, how do I access these pages? Very simple, man comes hand in hand with two programs that make life quite simple for us. aproposwhatis. The first allows us to search for references within the manuals (title and description) and the second allows us to search for all types of manuals for each available entry. But we are going to give an example to make it more didactic.

about

Let's see what happens when you use apropos man:

Own. Christopher Diaz Riveros

As you can see, the list is so large that my terminal did not reach to display all of it. Apropos searches both the title and the description, so using small words can be of little use since it generates a lot of results. But it's always great if we don't exactly remember the command name.

whats

As the name implies, this program uses the value of a program entry and shows you all the possible references it finds. To keep the spirit, let's try the following command: whatis man

Own. Christopher Diaz Riveros

As you can see, we are now in a much smaller format. This is one of the best parts of whatis, inside the parentheses it tells us which manual section is available. As you can see, man has three inputs: 1, 7, 1p.

use

In any of the above cases, just run any of these commands: man 1 man, man 7 man, man lp man.

Own. Christopher Diaz Riveros

As simple as that! 🙂 You will be able to see each of the respective entries, but that's not all. Man is also quite useful when being inside the manual, let's press h while we are inside:

Own. Christopher Diaz Riveros

As you can see, man uses moins as a pager. For this reason, many of the vim commands will come in handy in man, so there is no need to learn new syntax (for those who already know vim) when navigating the screens. If you remember my post about the kernel / y they are your friends 😉

info

info is a small program that displays friendlier text in some programs 😉 it goes hand in hand with man, but in particular cases, like many GNU programs, info is much more detailed (this is not the common case by the way) .

Final thoughts

This is my favorite command and the best command according to me 🙂 Mainly because, if we stop to think a bit about the matter, who better than the person who has designed a program to explain its use and advantages? The information that comes from the source to any type of adaptation will always be better (even my posts 😛).

It is becoming customary to write a lot, but I hope that if you have come this far, you will be a little curious about this wonderful command that gives us all the knowledge of Linux on our computers and without extra effort 🙂

For those who may have noticed, many of these manuals are in English, a wonderful opportunity to help the Hispanic world is to contact the developers (usually the bottom of the man page) and tell them that they want to create a translation, many of them will gladly accept . But for now I say goodbye.

Regards,


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.   Anonymous said

    Hello, great article

    One question, how do I access section 3, library calls (functions contained in the system libraries)?

    Saludos y gracias

    1.    ChrisADR said

      Hello

      With man 3 program / function

      Section 3 usually comes with "-dev" packages in many binary distributions and in the same library documentation. For these reasons, you will usually need to search for the name of the function that you want to use in your program. For example:

      apropos –sections = 3 popen

      it will return the two manual entries that the popen function has: 3 (from Linux) and 3p (from Posix). Every big FOSS project (at least the ones that you must run for your system to work) have a lot of documentation, but in smaller projects these may not exist at all.

      It is always advisable to take apropos and whatis as a reference, because the result indicates the manuals available for that program or function.

      regards

  2.   Mart said

    ~$ man 7
    No manual entry for 7
    (Alternatively, what manual page do you want from section 7?)
    ~$

    ... this throws me in that entry. I don't know if it's normal, or if more parameters are missing.

    1.    Mart said

      … I already realized my mistake. Apologies ...

  3.   Jose Gonzalez said

    Excellent post !!