68

I know that these command will help to get syntax and options for commands but my question is that how they differ from each other?

3 Answers 3

70

help is a built-in command in the bash shell (and that shell only) that documents some of the builtin commands and keywords of that shell. That's an internal documentation system of that shell. Other shells have their own documentation system (ksh93 has --help and --man options for its builtins, zsh has a run-help helper that extracts information from manuals in other formats). Other commands like vim have their own embedded documentation system.

man is a system-wide documentation system that provides short reference manuals (pages) for individual commands, API functions, concepts, configuration file syntax, file formats organised in sections (1 for user commands, 2 for system calls...). That's the traditional Unix documentation system.

info is another documentation system originating in the GNU project. It's hypertext with links (predates the web). An info manual is like a digital book with a concept of table of contents and (searchable) index which helps locating the information.

There's overlap between the 3. For instance, bash being part of the GNU project has both a man page and an info manual. The size of the manual makes the man system not as appropriate for bash though. However, the structure of the info manual and index is not very good in bash which makes it not as easy to look information in as in other info manuals like zsh's. zsh manual being even bigger is split into several man pages and also has a good info manual with a very good index.

It should be noted that the info manual is generated from a texinfo format which is also used to generate HTML and printable (PDF/PS) versions. In the case of zsh though, the texinfo is generated from another format (yodl).

4
  • 4
    This is the best answer, congratulations. The accepted one is too terse to be useful, given the general nature of the question.
    – neuronet
    Commented Jun 10, 2016 at 14:22
  • also useful: help help; not useful: man help.
    – De Novo
    Commented Oct 25, 2018 at 7:59
  • 2
    @DeNovo, yes, since help is a builtin of bash. More useful: info bash help. Commented Oct 25, 2018 at 8:15
  • 1
    Note that many GNU (and other) programs mangle/summarize the *.texi (i.e., info) documentation into man pages.
    – vonbrand
    Commented May 13, 2021 at 11:22
33

help is a bash built-in, providing help for bash commands only

man is the traditional form of help for almost every command on your system, and not only, sometimes also configuration files have their own man page. In Linux distros organized in packages, the relative text is in general provided from the same package providing the command. If you have bash-completion you can take advantage from TAB to see what man pages are available.

info is an alternative system to provide manual pages for commands, based on GNU emacs. It is provided mainly for GNU commands and utilities. It don't seem to be widely adopted from others.

23

help is a bash command. It uses internal bash structures to store and retrieve information about bash commands.

man is a macro set for the troff (via groff) processor. The output of processing a single file is sent to a pager by the man command by default.

info is a text-only viewer for archives in the info format output of Texinfo.

4
  • 8
    man is more than a "macro set for the troff processor". -1 for this answer.
    – fpmurphy
    Commented Aug 26, 2011 at 14:06
  • @fpmurphy: Not by much. Commented Aug 26, 2011 at 20:05
  • 12
    This explains very little.
    – Ankur S
    Commented May 9, 2018 at 20:08
  • 1
    This explanation is too simple compared to others. Commented Sep 21, 2021 at 2:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .