Welcome to Part 14 of the LFCS Certification - Phase 1 series! You've mastered man pages, info pages, and --help. Now let's uncover the hidden treasure trove of documentation in /usr/share/doc and discover tldr for lightning-fast command examples.
π― What You'll Learn: In this comprehensive guide, you'll master:
- What /usr/share/doc contains and why it matters
- Navigating package documentation directories
- Finding READMEs, examples, changelogs, and licenses
- Understanding documentation organization by package
- Installing tldr (Too Long; Didn't Read)
- Using tldr for quick command examples
- Comparing tldr vs man vs info vs --help
- Building your complete documentation library
- Finding configuration examples for real services
- 20+ comprehensive practice labs with solutions
Series: LFCS Certification Preparation - Phase 1 (Post 14 of 52) Previous: Part 13 - Using info, pinfo, and --help Next: Part 15 - Understanding Network Interfaces with ip Command
Understanding /usr/share/doc
What is /usr/share/doc? A directory containing package-specific documentation installed alongside software packages.
Why /usr/share/doc Matters
Unlike man and info pages, /usr/share/doc contains:
- README files - Installation notes, usage tips
- Example configurations - Real working examples
- Changelogs - Version history and changes
- License files - Software licenses
- HOWTOs - Step-by-step guides
- Sample scripts - Actual code you can use
π‘ Pro Tip: When configuring a complex service, ALWAYS check /usr/share/doc/package-name/examples/ first! You'll often find complete, working configuration examples that save hours of work.
Structure of /usr/share/doc
/usr/share/doc/
βββ package-name-1/
β βββ README
β βββ README.md
β βββ CHANGELOG.gz
β βββ LICENSE
β βββ examples/
β β βββ config.example
β β βββ script.example
β βββ NEWS.gz
βββ package-name-2/
β βββ ...
βββ ...
Exploring /usr/share/doc
Listing Installed Package Documentation
# List all package documentation
ls /usr/share/doc/
# Count how many packages have documentation
ls /usr/share/doc/ | wc -l
# Find specific package documentation
ls /usr/share/doc/ | grep ssh
Example output:
ls /usr/share/doc/ | grep ssh
openssh-8.7p1/
openssh-clients-8.7p1/
openssh-server-8.7p1/
Viewing Package Documentation
# Explore a package's documentation
## Test Section
This is a test to see if the first 100 lines work.

