I use both man and --help in Bash programming to get help. For example, to get information about usage of ls command, I may use

man ls 


ls --help

Both give some what similar output. What is the difference between these two?


For one, --help is not a command, it is an argument that is often given to a command to get help using it. Meanwhile, man is a command, short for "manual". Manual pages are installed by many programs, and are a common way to find help about commands, as well as system calls, (e.g. fork()).

If a program installs a manual page, it can always be accessed via the man command, whereas --help is just a common convention, but need not be enforced—it could be just (and only) -h.

man also typically uses a pager, such as less, automatically, which can make viewing and searching through the information much easier.

Finally, you mention Bash programming in your question—none of this is unique to Bash. Bash doesn't care about the commands themselves or their arguments for the most part.

  • 4
    To find out which document man will show you for ls you can type man -w ls
    – holygeek
    Dec 13 '11 at 4:52
  • @holygeek awesome, I didn't know that, actually. Dec 13 '11 at 4:54
  • I seldom do man man, but when I do, I always learn new stuff from it :)
    – holygeek
    Dec 13 '11 at 5:00
  • @holygeek Do you happen to know how to find the names of each manual section from the terminal? I feel like I used to know and now it's escaping me and I can't find it in man man. Dec 13 '11 at 5:03
  • I'm afraid I don't understand what you mean by "names of each manual section". I'm guessing you want something like man foo|grep '^[A-Z]' (for that I don't know the command line switch that does it directly too)? or maybe man -wa foo?
    – holygeek
    Dec 13 '11 at 5:06

In most scenarios man is more detailed than --help. help gives the command line options for a particular command. But man is a lot more detailed.

Plus man is a command-line tool in itself whereas --help is a command-line arg for a tool. Small difference.


In the first you asking the system to search the manual pages for help on the command. The second you are asking the command to provide its own help. The two will most certainly differ - usually the command provides a reminder of its options where as the man page is a detailed description.

  • While there is no guarantee that any documentation is correct, at least with --help you know that you are getting the help message from the program that you want to run. Man pages can get out of sync with /bin and so can refer to software versions different from what's actually installed.
    – Scott
    Oct 14 '14 at 17:02

man some_command is something you can expect to work on all Unix and Unix like OSes, unless the manual pages are not installed.

some_command --help is mostly a GNUism so it generally won't work with non GNU implementations.

GNU, which doesn't like manual pages for some reason, also introduced info some_command as third alternative.


I find --help useful as it lets me call help up while I'm modding a command

For example

rsync -vPn ./* ./newfolder/.

Oh -- What is the flag for compress?

rsync -vPn --help ./* ./newfolder/. | less

I find the help command on flags sometimes very very useful and less time consuming. With man I've got to type it in and the go back through my history to get back to the command I was in.

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.