Unix-like systems have nearly always come with a manual, and Linux is no exception. On a Raspbian machine, there are at least a couple of manuals available at all times.

It's natural to reach for Google as soon as you run into a technical problem, but sometimes the fastest route to a solution is the locally installed manuals. (And sometimes you just don't have an internet connection.)

man

Curious about a given topic? If you know the name of a command, you can use man (short for "manual"). For example, man grep will tell you more than you ever wanted to know about the grep command. You can search by keyword with man -k keyword. You can also search with apropos keyword, which for some reason I have always found easier to remember.

There's an art to reading most man pages. They're not always the friendliest documents, at first glance, but once you have the basics down, they often pack a lot of knowledge into a small space. Here's how the man page for grep usually displays, with a few bits highlighted:

A - GREP(1)

Name of the man page in all caps, followed by the section of the manual in parentheses. Most things you look up will be in section 1, for general programs, but there are 7 more.

B - grep, egrep, fgrep, etc.

Various alternate names under which grep can be invoked, followed by a brief description of the command.

C - SYNOPSIS

One or more summaries of how the command is invoked. Optional things are usually inside square brackets, alternatives are denoted witha |, and so on.

D - DESCRIPTION

A longer prose description of the command and its uses.

E - OPTIONS

A breakdown of available options which change the behavior of the command.

F - --version

A lot of options have both a short form (-V) and a long form (--version). A lot of the time (but not always!), the long version uses two dashes and the short version uses one.

You'll often find other info - the authors of a given program, notes about its history or how it differs from other versions of the same utility, known bugs, pointers to related programs, and so forth.

GNU info

The GNU project, responsible for the versions of the core utilities most commonly used on Linux systems, has its own documentation system, called info. It can be browsed by topic just by invoking info or searched with info -k keyword. If you already know the name of a node, you can just say info node. For example, the documentation on info itself can be reached with info info.

Documentation from Installed Packages

Debian, the distribution Raspbian is based on, installs a lot of documentation in /usr/share/doc. If you look there, you'll find a directory for most installed packages, often containing a brief README and sometimes complete with example configuration files and scripts. These can be a real life-saver.

Ask the Program You're Trying to Use for Help

It's often the case that utilities are written with their own built-in help. For example, grep (about which we'll be talking more in a minute) has a --help option. This isn't always provided, but it's enough of a convention that it's worth trying if you're stumped.

Commands with a lot of options might print quite a bit more help than fits on your screen. There's a generic solution to the problem of text scrolling out of your terminal: Pipe the command to less.

This guide was first published on Feb 24, 2015. It was last updated on Feb 24, 2015.

This page (Read the Manual) was last updated on Feb 20, 2015.

Text editor powered by tinymce.