passwd has both a command page and a file-format page.
Open section 5, which documents the /etc/passwd format.
Which command is appropriate?
man SECTION PAGE selects a specific manual section, so man 5 passwd opens the file-format page.
Detailed explanation
man passwd 5Incorrect. The section number normally precedes the page name.
Incorrect. The section number normally precedes the page name.
man 5 passwdCorrect. man 5 passwd explicitly selects section 5.
Correct. man 5 passwd explicitly selects section 5.
man -5 passwdIncorrect. -5 is not the usual section-selection syntax.
Incorrect. -5 is not the usual section-selection syntax.
man /etc/passwdIncorrect. A normal man-page lookup uses a page name, not the /etc/passwd file path.
Incorrect. A normal man-page lookup uses a page name, not the /etc/passwd file path.
Try it yourself
An example you can run in a temporary verification environment.
man -w 5 passwd 2>/dev/null || trueExpected result
導入済み環境ではpasswd(5)のmanページファイルへのパスKey points
- Section 1 contains user commands
- Section 5 contains file formats
- The syntax is man SECTION PAGE
Notes
- Environment: Linux man-db / manページ導入済みの場合 / パス照会のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.