Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Getting Help

The Bash shell comes with a built-in help command to describe the various built-in Bash commands. The -s switch displays a summary for the command you specify.

$ help -s printf
printf: printf format [arguments]

Help only describes Bash commands. To get help on Linux commands, you need to use the man (manual) command.

$ man date

Linux divides its manual pages into a number of logical volumes. man displays any matching entries from any volume. Volume 1 contains the commands you can execute from the shell. To restrict your search to shell commands, use man 1.

$ man 1 date

If there are pages in more than one manual volume, only the page from the first volume that matches your search is displayed. To find matching pages across all manual volumes, use the -a (all) switch.

The -k switch searches the Linux manual for a particular keyword and lists all man pages referring to that keyword.

$ man 1 -k alias

The command help type gives you different information than man 1 type. The help type command tells you about Bash's built-in type command, whereas the man 1 type command tells you about the Linux type command. If you are not sure whether a command is a Bash command, always try the help command before using the man command.

  • + Share This
  • 🔖 Save To Your Account