Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 8 down vote accepted

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.

share|improve this answer
    
thats clear... thank you. –  Rupesh Pawar Aug 26 '11 at 5:06
1  
man is more than a "macro set for the troff processor". -1 for this answer. –  fpmurphy1 Aug 26 '11 at 14:06
    
@fpmurphy: Not by much. –  Ignacio Vazquez-Abrams Aug 26 '11 at 20:05

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.

share|improve this answer

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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