Lesson 2.3: Getting help on the command line
Manual pages and how to read them, --help, whatis and apropos for finding commands, and shell builtins that have no man page (type and help).
15 min
You will learn to
- Open and read a man page: NAME, SYNOPSIS, DESCRIPTION, OPTIONS
- Read the notation in a synopsis: [ ] and ...
- Get a quick summary with --help and whatis
- Find a command you don't know the name of with apropos
- Recognise shell builtins with type and use help for them
Key terms
- Manual page (man page)
- The official documentation of a command or file, installed with it and opened with man.
- Manual sections
- Man pages are grouped into numbered sections: 1 user commands, 5 file formats, 8 system administration commands, among others.
- Synopsis notation
- In a synopsis, [ ] marks something optional, ... means it may repeat, and words in capitals are placeholders you replace.
- --help
- An option most GNU commands accept: prints a short usage summary and exits.
- whatis and apropos
- whatis prints a command's one-line description; apropos searches all those descriptions for a keyword.
- Shell builtin
- A command implemented inside the shell itself rather than as a separate program. Builtins have no man page; help NAME explains them.
← Command line arguments and options · All lessons · Looking at text files: cat, less and more →