Locating system documentation files

2.2 Using the Command Line to Get Help (Weight: 2)

📘Linux Essentials (LPI 010-160)


System documentation is very important in Linux. It helps users and administrators understand how commands, programs, and system features work. Linux systems include many built-in documentation files that can be accessed from the command line.

For the Linux Essentials (LPI 010-160) exam, you must understand where documentation files are stored, how to locate them, and how to read them using command-line tools.

This section explains the important documentation locations and how they are used in a Linux environment.


1. What Are System Documentation Files?

System documentation files are text files that provide information about software, commands, configuration files, and system components.

These files may include:

  • Installation instructions
  • Configuration guidelines
  • Feature descriptions
  • Software licenses
  • Usage instructions
  • Change history
  • Troubleshooting information

In an IT environment, administrators often read documentation files to:

  • Understand how installed software works
  • Check configuration instructions
  • Read release notes before updating software
  • Review license information

Most documentation files are stored in standard directories so they can be easily located.


2. Standard Location for Documentation

The most common location for software documentation in Linux is:

/usr/share/doc

This directory contains documentation for installed packages.

Example structure

/usr/share/doc/
├── bash/
├── coreutils/
├── openssh/
├── nginx/
└── python3/

Each package usually has its own directory inside /usr/share/doc.

Example:

/usr/share/doc/bash

Inside the directory you may find files such as:

README
INSTALL
NEWS
CHANGELOG
COPYING

These files provide important details about the software.


3. Common Documentation File Types

Several common documentation files appear in /usr/share/doc.

README

The README file usually contains:

  • Basic information about the software
  • Important notes
  • Usage instructions
  • Known issues

Example:

/usr/share/doc/bash/README

System administrators often check the README file first.


INSTALL

The INSTALL file explains:

  • How the software is installed
  • Required dependencies
  • Installation steps

This file is especially useful when software is compiled from source code.


CHANGELOG

The CHANGELOG file records changes between software versions.

It may include:

  • Bug fixes
  • New features
  • Removed features
  • Security updates

Example:

/usr/share/doc/package-name/changelog

Administrators read changelogs before updating software to understand what changed.


NEWS

The NEWS file contains important updates and announcements related to the software.

This file highlights major improvements or significant changes.


COPYING or LICENSE

These files contain software license information.

Examples of licenses include:

  • GNU General Public License (GPL)
  • MIT License
  • Apache License

Example:

/usr/share/doc/package-name/COPYING

This file explains how the software can be used, modified, and distributed.


4. Listing Documentation Files

You can use the ls command to list documentation directories.

Example:

ls /usr/share/doc

This shows documentation directories for installed packages.

To view documentation for a specific package:

ls /usr/share/doc/bash

This command lists all documentation files available for the Bash shell.


5. Reading Documentation Files

Documentation files are usually plain text, so they can be viewed using text viewing commands.

Common commands include:

cat

Displays the entire file.

cat /usr/share/doc/bash/README

less

Displays the file one screen at a time.

less /usr/share/doc/bash/README

Advantages of less:

  • Scroll up and down
  • Search inside the file
  • Read large files easily

This command is commonly used by system administrators.


more

Another pager similar to less.

more /usr/share/doc/bash/README

However, less is usually preferred because it offers more navigation features.


6. Searching Documentation Files

Linux systems may contain thousands of documentation files. Searching helps find specific information quickly.

Using the find command

You can locate documentation files with find.

Example:

find /usr/share/doc -name README

This command searches for all files named README.


Using the grep command

grep searches inside files for specific text.

Example:

grep -i "configuration" /usr/share/doc/bash/*

This searches for the word configuration inside documentation files.

Options:

  • -i → ignore case

This command is useful when looking for specific instructions inside documentation.


7. Compressed Documentation Files

Some documentation files are stored in compressed format to save disk space.

Common compression formats:

.gz
.bz2
.xz

Example:

README.gz
CHANGELOG.gz

To read compressed files without extracting them:

zcat

zcat README.gz

zless

zless README.gz

zless works like less but for compressed files.


8. Package-Specific Documentation

Most software packages automatically install documentation when installed.

Example directories:

/usr/share/doc/openssh
/usr/share/doc/nginx
/usr/share/doc/python3

These directories contain documentation specific to that package.

System administrators often check these files when configuring or troubleshooting services.

Example use in an IT environment:

  • Reading configuration notes for a web server
  • Checking upgrade instructions before installing a new version
  • Reviewing security changes in updated packages

9. Other Documentation Locations

Although /usr/share/doc is the most common location, documentation may also exist in other directories.

/usr/share/man

Contains manual pages used by the man command.

Example:

man ls

/usr/share/info

Contains GNU Info documentation, which is another documentation format.

Example command:

info coreutils

/usr/share/help

Some graphical desktop environments store help files here.

Example:

/usr/share/help/en-US/

10. Importance of Documentation in System Administration

In professional IT environments, documentation files are frequently used to:

  • Understand command options
  • Configure services
  • Review system behavior
  • Investigate software updates
  • Troubleshoot problems

Instead of searching external sources, administrators can often find reliable information directly on the system.


11. Key Points for the LPI 010-160 Exam

You should understand the following concepts:

Important documentation directory

/usr/share/doc

Common documentation files

  • README
  • INSTALL
  • CHANGELOG
  • NEWS
  • COPYING / LICENSE

Useful commands

List documentation:

ls /usr/share/doc

Read documentation:

less file
cat file
more file

Search documentation:

find /usr/share/doc -name filename
grep "text" file

Read compressed documentation:

zcat file.gz
zless file.gz

Summary

Linux systems include extensive built-in documentation to help users understand software and system components. Most documentation files are stored in /usr/share/doc, where each installed package has its own directory.

Important documentation files include README, INSTALL, CHANGELOG, NEWS, and COPYING, which provide details about software usage, installation, updates, and licensing.

Administrators can locate and read documentation using commands such as ls, less, cat, find, and grep, and can also view compressed documentation using zcat or zless.

Understanding how to locate and read system documentation is an essential skill for managing Linux systems and is required knowledge for the Linux Essentials (LPI 010-160) certification exam.

Buy Me a Coffee