Why are there about four different ways of getting help or documentation about a command in Linux software?

What are the differences between

  • man x
  • help x
  • info x
  • x --help (or x -h)

(where x stands for the command / software)?

2 Answers 2

  • man is the historical unix documentation system. "manpages" come in Troff-formatted text files, that you'll find in /usr/share/man. Traditionally, it's more a reminder help for experts than a full-fledged documentation.
  • help is a shell built-in command. It provides some help about well, shell built-in commands.
  • info is the documentation system from the GNU project. It's quite similar to man, but comes with hyperlinks (so you can navigate from one documentation to another, like HTML files). It didn't really get much traction out of the GNU world, most Linux programs man and info pages come with the same text. However, GNU programs (GNU tar, GNU Emacs, etc) comes with an extremely comprehensive "info" documentation.
  • x -h or x --help is the usual way to ask a program for some basic help, like x /? in the DOS/Windows world. It's part of the most basic development good practice to manage properly these switches.

x -h or x --help : the program x itself produces the output.
man or info are themselves programs that display info from a text library. (see wazoox answer for good info.
help : never heard of. Probably an obsolete bash-builtin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.