Documentation Discovery

After installing any package, find its documentation across all four locations: man pages, info pages, /usr/share/doc/, and zsh completions. Covers self-documenting tools (PowerShell Get-Help, Python pydoc, Rust rustup doc).

Documentation Discovery

After installing any package, run these to find what documentation it shipped.

Step 1: What did this package install?

List all installed files for a package
pacman -Ql powershell-bin
# Shows every file the package installed — look for man/, doc/, info/, help
Filter for documentation files only
pacman -Ql powershell-bin | grep -E 'man/|doc/|info/|help|README|LICENSE|\.txt$|\.html$|\.md$'
# Output for powershell-bin:
# /usr/lib/powershell-7/en-US/default.help.txt
# /usr/share/licenses/powershell-bin/LICENSE.txt
# No man page. No info page. Self-documenting via Get-Help.

Step 2: The four documentation locations

Man pages — primary tool reference
man pwsh                              # Direct lookup
man -k powershell                     # Keyword search (apropos)
man -w pwsh                           # Path to man file (empty = no man page)
ls /usr/share/man/man1/pwsh* 2>/dev/null   # Check directly
Info pages — GNU deep tutorials
info pwsh                             # Direct lookup
info grep                             # Example: grep has extensive info pages
info grep -o - | nvim -R -            # Read in neovim with full search
Package docs — HTML guides, examples, FAQs
ls /usr/share/doc/powershell-bin/ 2>/dev/null
# Many packages ship HTML docs here:
ls /usr/share/doc/bash/              # bashref.html, FAQ
ls /usr/share/doc/kitty/html/        # 266 HTML files
w3m /usr/share/doc/bash/bashref.html # Read HTML in terminal
Zsh completions — reveals every flag
ls /usr/share/zsh/functions/Completion/Unix/_pwsh 2>/dev/null
# Completion files document flags the man page sometimes misses
cat /usr/share/zsh/functions/Completion/Unix/_git | head -30

Step 3: Self-documenting tools (their own help system)

Some tools bypass man/info entirely and use built-in help:

PowerShell — Get-Help (Vector 2: object-oriented model)
pwsh -c 'Get-Help Get-Process -Full'
pwsh -c 'Get-Help about_Pipelines'
pwsh -c 'Get-Help *network*'
pwsh -c 'Update-Help -Force'          # Download latest help from Microsoft
Python — built-in help and pydoc
python3 -c 'help(str)'
python3 -c 'help(json)'
pydoc3 json
pydoc3 -b                              # Start local doc server in browser
Rust — rustup doc
rustup doc --std                       # Opens standard library docs
rustup doc --book                      # The Rust Book
Go — go doc
go doc fmt.Println
go doc net/http

The Full Discovery Sequence

After installing any package:

PKG="powershell-bin"

# 1. What files did it install?
pacman -Ql "$PKG" | grep -E 'man/|doc/|info/|help|README'

# 2. Does it have a man page?
man -w "$(pacman -Ql "$PKG" | awk '/\/bin\//{print $2}' | head -1 | xargs basename)" 2>/dev/null && echo "HAS MAN" || echo "NO MAN"

# 3. Does it have info pages?
ls /usr/share/info/ | grep -i "${PKG%%-*}"

# 4. Does it have /usr/share/doc content?
ls /usr/share/doc/"$PKG"/ 2>/dev/null || ls /usr/share/doc/"${PKG%%-*}"/ 2>/dev/null

# 5. Does it have zsh completions?
ls /usr/share/zsh/functions/Completion/Unix/_* | grep -i "${PKG%%-*}"

# 6. Does it have built-in help?
echo "Try: <command> --help, <command> help, or the tool's native help system"

Man Page Section Cheat Sheet

Section Pages What to find here

1

2,229

User commands — man grep, man awk

2

525

System calls — man 2 socket, man 2 open

3

13,028

Library functions — man 3 printf, man 3 openssl

5

540

Config file formatsman 5 sshd_config, man 5 sudoers (most underused)

7

571

Overviews — man 7 ip, man 7 namespaces, man 7 hier

8

831

Admin commands — man 8 mount, man 8 systemctl

Section 5 documents config file syntax — man 5 sshd_config tells you every option. Section 7 gives architectural overviews — man 7 ip explains TCP/IP on Linux.

Curated Gold Pages

Found via man -k examples, man -k '' | grep '(7)', and man -k '' | grep '(5)'. These are the pages worth reading front-to-back.

Examples Pages (Real-World Usage)

man nmcli-examples       # NetworkManager CLI — connection profiles, WiFi, VPN, bond, bridge
man aerc-tutorial        # Terminal email client tutorial

Section 5 — Config File Formats (Most Underused)

SSH & Security
man 5 sshd_config        # Every SSH server option
man 5 ssh_config         # Every SSH client option
man 5 sudoers            # Sudo policy syntax — who can run what
Systemd
man 5 systemd.service    # How to write service units
man 5 systemd.timer      # Cron replacement — systemd timers
man 5 systemd.network    # systemd-networkd config
man 5 journald.conf      # Journal/log configuration
Network
man 5 NetworkManager.conf     # NM global config
man 5 nm-settings-nmcli       # Every nmcli property name — the real reference
man 5 wpa_supplicant.conf     # 802.1X supplicant config
man 5 resolv.conf             # DNS resolver
System
man 5 fstab              # Mount configuration
man 5 pacman.conf        # Pacman package manager config
man 5 mkinitcpio.conf    # Initramfs configuration
man 5 passwd             # Password file format
man 5 proc               # /proc filesystem — everything the kernel exposes
Desktop (Hyprland/Waybar)
man 5 waybar-network                # Waybar network module
man 5 waybar-hyprland-workspaces    # Hyprland workspace module
man 5 waybar-hyprland-language      # Hyprland language module

Section 7 — Architecture & Overviews (The "Why" Pages)

Networking
man 7 ip                 # Linux IPv4 implementation — routing, sockets, raw access
man 7 tcp                # TCP protocol internals — congestion, keepalive, window scaling
man 7 socket             # Socket interface — the foundation of all network code
man 7 netdevice          # Low-level network device access
man 7 kerberos           # Kerberos authentication overview
Process & Security Model
man 7 namespaces         # Linux namespaces — the foundation of containers
man 7 capabilities       # Linux capabilities — fine-grained root replacement
man 7 credentials        # Process UIDs, GIDs, supplementary groups
man 7 signal             # Signal handling reference — SIGTERM, SIGKILL, traps
man 7 daemon             # How to write system daemons correctly
man 7 cgroups            # Control groups — resource limits for processes
Filesystem & IPC
man 7 hier               # Filesystem hierarchy — what goes where and why
man 7 pipe               # Pipes and FIFOs — the foundation of shell pipelines
man 7 fifo               # Named pipes
man 7 unix               # Unix domain sockets — local IPC
Text & Patterns
man 7 regex              # POSIX regex syntax — the authoritative reference
man 7 glob               # Glob pattern syntax — what * and ? really mean
man 7 ascii              # ASCII table — decimal, hex, octal
man 7 utf-8              # UTF-8 encoding explained
Git (Deep Tutorials)
man 7 gittutorial        # Git tutorial part 1
man 7 gittutorial-2      # Git tutorial part 2
man 7 gitworkflows       # Recommended Git workflows
man 7 gitcredentials     # How Git handles credentials

Extracting Sections from Man Pages

Line-addressed (quick look)
man grep | wc -l                  # measure
man grep | sed -n '600,620p'      # extract tail
Content-addressed (survives version changes)
man grep | col -b | awk '/^SEE ALSO/{p=1; next} /^[A-Z]/ && p{exit} p'
# col -b strips terminal escape codes — ALWAYS use before pattern matching on man output
Dump to neovim for full navigation
info grep -o - | nvim -R -
man grep | col -b | nvim -R -

See Also