Explain the sections
Learn
Manual sections
Manuals are split into numbered sections by kind of thing, so the same name can appear in more than one:
- 1: user commands (
ls,grep) - 5: file formats and config files (e.g.
passwdthe file) - 8: system administration commands
So passwd (1) is the command you run to change a password, while passwd (5) documents
the /etc/passwd file format: different pages, same name, told apart by the section
number.
This step isn't a command: answer the questions below.
Your task
Answer the questions below about manual sections.
Interview prep
Knowing how to read the manual is what lets you pick up any command on the job; interviewers notice when you reach for man instead of guessing.
You're on a server with no internet and don't remember a command's flags. What do you do?
Read its manual in place: man <cmd> opens the page, and man <cmd> | grep <keyword> jumps straight to the flag I need. If I don't even know the command's name, apropos <keyword> (a.k.a. man -k) searches every manual's summary by topic, and whatis <cmd> gives the one-line reminder. The section number in ls (1) tells me which manual section the page lives in — handy when a name exists in several (e.g. passwd (1) the command vs passwd (5) the file).