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.
man 5 passwdCorrect. man 5 passwd explicitly selects section 5.
man -5 passwdIncorrect. -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.
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ページ導入済みの場合 / パス照会のみ
- Use disposable shell sessions and harmless commands for experiments.
- Shell behavior can depend on Bash options and distribution defaults.
Foundation review
Place the operation
The section number disambiguates a file-format page from a command page with the same name.
Check the side effect
Use the section shown by the local manual index because available sections vary by installation.