Before you can understand what is really going on when there is a problem, you need to know the theoretical role played by each program involved in the problem. One of the best ways to do this is to review the program’s documentation. Let’s begin by discussing where, exactly, you can find documentation since it is often scattered.
Manual pages, while relatively terse in style, contain a great deal of essential information. To view a manual page, simply type
man manual-page. The manual page usually coincides with the command name. For example, to learn about the possible options for the
cp command, you would type
man cp at the command prompt.
Man pages not only document programs accessible from the command line, but also configuration files, system calls, C library functions, and so forth. Sometimes names can collide. For example, the shell’s
read command has the same name as the
read system call. This is why manual pages are organized in the following numbered sections:
- 1. Commands that can be executed from the command line
- 2. System calls (functions provided by the kernel)
- 3. Library functions (provided by system libraries)
- 4. Devices (on Unix-like systems, these are special files, usually placed in the
- 5. Configuration files (formats and conventions)
- 6. Games
- 7. Sets of macros and standards
- 8. System administration commands
- 9. Kernel routines
You can specify the section of the manual page that you are looking for: to view the documentation for the
readsystem call, you would type
man 2 read. When no section is explicitly specified, the first section that has a manual page with the requested name will be shown. Thus,
man shadow returns shadow(5) because there are no manual pages for shadow in sections 1–4.
Of course, if you do not know the names of the commands, the manual is not going to be of much use to you. Enter the
apropos command, which searches manual pages (or more specifically their short descriptions) for any keywords that you provide. The
apropos command then returns a list of manual pages whose summary mentions the requested keywords along with the one-line summary from the manual page. If you choose your keywords well, you will find the name of the command that you need.
Example 6.1. Finding
$ apropos "copy file"
cp (1) - copy files and directories
cpio (1) - copy files to and from archives
gvfs-copy (1) - Copy files
gvfs-move (1) - Copy files
hcopy (1) - copy files from or to an HFS volume
install (1) - copy files and set attributes
ntfscp (8) - copy file to an NTFS volume.
In addition to
man, you can use
konqueror (in KDE) and
yelp (in GNOME) to search man pages as well.
The GNU project has written manuals for most of its programs in the info format; this is why many manual pages refer to the corresponding info documentation. This format offers some advantages but the default program to view these documents (also called
info) is slightly more complex. You would be well advised to use
pinfoinstead (from the pinfo package). To install it, simply run
apt update followed by
apt install pinfo (see Section 220.127.116.11, “Installing Packages with APT”).
The info documentation has a hierarchical structure and if you invoke
pinfo without parameters, it will display a list of the nodes available at the first level. Usually, nodes bear the name of the corresponding commands.
You can use the arrow keys to navigate between nodes. Alternatively, you could also use a graphical browser (which is a lot more user-friendly) such as
As far as language translations are concerned, the info system is always in English and is not suitable for translation, unlike the
man page system. However, when you ask the
pinfo program to display a non-existing info page, it will fall back on the man page by the same name (if it exists), which might be translated.
Each package includes its own documentation and even the least documented programs generally have a
README file containing some interesting and/or important information. This documentation is installed in the
/usr/share/doc/package/ directory (where package represents the name of the package). If the documentation is particularly large, it may not be included in the program’s main package, but might be offloaded to a dedicated package which is usually named
package-doc. The main package generally recommends the documentation package so that you can easily find it.
/usr/share/doc/package/ directory also contains some files provided by Debian, which complete the documentation by specifying the package’s particularities or improvements compared to a traditional installation of the software. The
README.Debian file also indicates all of the adaptations that were made to comply with the Debian Policy. The
changelog.Debian.gz file allows the user to follow the modifications made to the package over time; it is very useful to try to understand what has changed between two installed versions that do not have the same behavior. Finally, there is sometimes a
NEWS.Debian.gz file that documents the major changes in the program that may directly concern the administrator.
In many cases, you can find websites that are used to distribute free software programs and to bring together the community of its developers and users. These sites are loaded with relevant information in various forms such as official documentation, frequently asked questions (FAQ), and mailing list archives. In most cases, the FAQ or mailing list archives address problems that you have encountered. As you search for information online, it is immensely valuable to master search syntax. One quick tip: try restricting a search to a specific domain, like the one dedicated to the program that is giving you trouble. If the search returns too many pages or if the results do not match what you seek, you can add the keyword
debian to limit results and target relevant information.
If you do not know the address of the software’s website, there are various means of locating it. First, look for a
Homepage field in the package’s meta-information (
apt show package). Alternatively, the package description may contain a link to the program’s official website. If no URL is indicated, the package maintainer may have included a URL in the
/usr/share/doc/package/copyright file. Finally, you may be able to use a search engine (such as Google, DuckDuckGo, Yahoo, etc.) to find the software’s website.
The Kali project maintains a collection of useful documentation at http://docs.kali.org. While this book covers a large part of what you should know about Kali Linux, the documentation there might still be useful as it contains step-by-step instructions (much like how-tos) on many topics.
Let’s review the various topics covered there:
- Getting started: a series of instructions, including download instructions, for those new to Kali
- Kali Linux Live: documentation describing how to use Kali Linux as a live system
- Installing Kali Linux: various documents describing Kali Linux installation, including how to install it side-by-side with other operating systems
- Kali Linux on ARM: many recipes about running Kali Linux on various ARM-based devices
- Using Kali Linux: multiple how-tos covering many common requests
- Customizing Kali Linux: instructions for the tinkerers who like to rebuild Kali based on their own requirements
- Kali Community Support: pointers to the various communities where you can get support and explanations on how to submit bug reports
- Kali Linux Policies: explanations about what makes Kali Linux special when compared to other Linux distributions
- The Kali Linux Dojo: videos of Black Hat and DEF CON workshops