There is one skill that separates the administrator who resolves incidents from the one who escalates them: not needing the internet to know what a command does. Linux comes with its own documentation installed, written by the people who developed each tool, matching the exact version you have in front of you and available even when the server is isolated on a network with no way out.

That last part is not a theoretical assumption. A properly configured production server is usually behind a firewall that does not allow browsing. A banking or healthcare environment may be on a completely separate network. And when there is a serious incident, the first thing to be cut off is external access. If your working method is "I'll look it up", at that moment you are left without a method.

This lesson teaches you the alternative method. By the end of it you will know how to read a whole manual page — including that notation with brackets and bars that looks like hieroglyphics — how to find a command when you cannot remember its name, and which of the five different documentation sources holds the answer you need. It is probably the most profitable lesson in the module.

Contents

  1. The five documentation sources on a Linux system
  2. man: the system manual
  3. How to read the SYNOPSIS notation
  4. The manual sections and why they exist
  5. Searching the manual: whatis, apropos and man -k
  6. Navigating with less inside man
  7. --help: the quick summary
  8. info: the extensive GNU documentation
  9. help: the Bash builtins and why man cd does not work
  10. Local documentation in /usr/share/doc
  11. tldr and cheat: the complement, not the substitute
  12. Exit codes and $?: knowing whether something failed
  13. A search strategy for when you do not even know the name

  1. The five documentation sources on a Linux system

Before going into detail, the map. On srv-tramontana five different sources live side by side, and choosing the wrong one wastes your time:

Source Command Length When it is the right one
Manual man cmd Medium to long The reference. Your first stop almost always
Brief help cmd --help Short Recalling an option you already knew
Info info cmd Very long GNU tools with book-style documentation
Builtins help cmd Medium Bash internal commands: cd, export, type...
Package /usr/share/doc/ Variable Configuration examples, changelogs, distribution notes

And a sixth, optional one, which needs placing properly: tldr, which gives practical examples but is not official documentation and is not exhaustive.

The operating rule: --help to recall, man to understand, info to go deep, /usr/share/doc to configure.

  1. man: the system manual

man (from manual) shows the official documentation page for a command, a configuration file, a system call or a file format.

operator@srv-tramontana:~$ man ls

It opens full screen in a pager. You leave with q.

Manual pages have followed a standardised structure since the 1970s. Knowing it lets you jump straight to what you are after instead of reading from top to bottom:

Page section What it contains When you read it
NAME Name and a one-line description To confirm this is the command you were after
SYNOPSIS The complete formal syntax The densest and the most useful. Section 3
DESCRIPTION What it does, in prose The first time you use the command
OPTIONS Every option, one by one 80 % of your real queries
EXIT STATUS What each exit code means When writing scripts (Module 4)
ENVIRONMENT Variables that alter its behaviour When the command "behaves oddly"
FILES Files it reads or writes Looking for where its configuration is
EXAMPLES Usage examples When it exists, it is the first thing to look at
BUGS Known limitations When something does not work and you cannot see why
SEE ALSO Related pages When this was not the command you needed

Two pieces of advice that change how man gets used:

  • Start with EXAMPLES if it exists. Not every page has one (GNU pages usually do not), but when it is there it settles the question in thirty seconds.
  • Finish with SEE ALSO when you have picked the wrong command. It is the list of related tools written by the people who know the domain best.

A real example of selective reading. You need to know which files the SSH service uses:

operator@srv-tramontana:~$ man sshd

Inside, you press /FILES and Enter: you jump straight to the list of files, without reading the three hundred lines before it. We will come back to this technique in section 6.

  1. How to read the SYNOPSIS notation

The SYNOPSIS is the part most people skip and the one that contains the most information. It is written in a formal notation with fixed rules:

Notation Meaning Example
Bold text Type it literally, exactly as shown ls
Italic text or <uppercase> Replace it with your value FILE → access.log
[something] Optional [OPTION]
something... Can be repeated FILE... = one or several
a|b One or the other, mutually exclusive -a|-b
{a|b} You must choose one of the group {start|stop}
[-abc] Short options that can be grouped [-alh]

Let us see it applied. The SYNOPSIS of cp:

SYNOPSIS
       cp [OPTION]... [-T] SOURCE DEST
       cp [OPTION]... SOURCE... DIRECTORY
       cp [OPTION]... -t DIRECTORY SOURCE...

That page is telling you three things that are not written out in prose anywhere:

  1. There are three valid ways of invoking cp, not one. Each line is a complete form.
  2. In the first one, SOURCE and DEST appear without brackets: they are mandatory. cp with no arguments fails.
  3. In the second one, SOURCE... carries the ellipsis and the last argument is called DIRECTORY: you can copy several files at once, but then the destination has to be a directory. That explains an error you will see in lesson 02-04.

Another example, man 5 crontab against man 1 crontab:

SYNOPSIS
       crontab [-u user] file
       crontab [-u user] [-l | -r | -e] [-i] [-s]

Here [-l | -r | -e] tells you that listing, deleting and editing are mutually exclusive: you cannot ask for two at once. The whole logic of the command is in a single line.

A mental exercise you should always do: before reading OPTIONS, read the SYNOPSIS and ask yourself how many invocation forms there are and what is mandatory. Very often the answer is already there.

  1. The manual sections and why they exist

The manual is divided into eight numbered sections. The reason is that the same name can refer to different things: passwd is a command and a configuration file; printf is a command and a C function.

Section Contents Typical example
1 User commands man 1 ls, man 1 passwd
2 System calls (to the kernel) man 2 open, man 2 read
3 Library functions (C) man 3 printf, man 3 malloc
4 Special files in /dev man 4 null, man 4 random
5 File and configuration formats man 5 passwd, man 5 fstab, man 5 crontab
6 Games man 6 sl
7 Conventions and miscellany man 7 hier, man 7 signal, man 7 regex
8 Administration commands man 8 mount, man 8 useradd, man 8 sshd

The three you will use constantly as an administrator are 1 (commands), 5 (configuration files) and 8 (root tools).

When you run man passwd with no number, man gives you the first section where it finds that page, normally section 1:

operator@srv-tramontana:~$ man passwd
PASSWD(1)                    User Commands                    PASSWD(1)

NAME
       passwd - change user password

But if what you want is to understand the format of the /etc/passwd file, that is a completely different page:

operator@srv-tramontana:~$ man 5 passwd
PASSWD(5)              File Formats and Conversions              PASSWD(5)

NAME
       passwd - the password file

DESCRIPTION
       /etc/passwd contains a list of the system's accounts, giving for
       each account some useful information like user ID, group ID,
       home directory, shell, ...

The header always tells you which section you are in: PASSWD(1) against PASSWD(5). Get into the habit of looking at that number: it is how you know whether you are reading the right page.

To find out which sections a page exists in:

operator@srv-tramontana:~$ man -f passwd
passwd (1)           - change user password
passwd (1ssl)        - compute password hashes
passwd (5)           - the password file

operator@srv-tramontana:~$ man -a passwd

man -a shows you all of them in sequence: when you leave one with q, it asks whether you want to see the next.

Two section 7 pages worth knowing about already:

man 7 hier      # The complete directory tree: the FHS from Module 1, on the system itself
man 7 signal    # Signals (useful in lesson 03-06)

  1. Searching the manual: whatis, apropos and man -k

These two tools answer the two most frequent questions.

"What is this command I have just seen in a script?" → whatis (equivalent to man -f), which shows only the NAME line:

operator@srv-tramontana:~$ whatis rsync
rsync (1)            - a fast, versatile, remote (and local) file-copying tool

operator@srv-tramontana:~$ whatis tar cpio
tar (1)              - an archiving utility
cpio (1)             - copy files to and from archives

"I do not know what the command I need is called" → apropos (equivalent to man -k), which searches for the word in the descriptions of all the installed pages:

operator@srv-tramontana:~$ apropos "disk space"
df (1)               - report file system disk space usage
du (1)               - estimate file space usage
ncdu (1)             - NCurses Disk Usage

In three seconds, with no search engine, you have the three tools that exist for the problem. This is the answer to the "the CLI is not discoverable" criticism from section 1 of the previous lesson: it is discoverable, but you discover it with apropos, not with menus.

When the search returns too much, you narrow it down:

operator@srv-tramontana:~$ apropos -s 8 network
ifconfig (8)         - configure a network interface
ip (8)               - show / manipulate routing, network devices...
netplan (8)          - Ubuntu Network Configuration

-s 8 restricts it to the administration section. You can also limit the search to the name instead of the description:

operator@srv-tramontana:~$ apropos -e tar
tar (1)              - an archiving utility

-e forces an exact match, which is useful because apropos tar would return dozens of pages containing "tar" inside other words.

If apropos answers nothing appropriate, the index database may not have been generated. You regenerate it with:

operator@srv-tramontana:~$ sudo mandb
Purging old database entries in /usr/share/man...
0 old manual pages deleted
15 manual pages added

  1. Navigating with less inside man

man draws nothing by itself: it sends the text to a pager, which on Ubuntu is less. The shortcuts you learn here also work for viewing files and logs (lesson 02-05), so they pay off twice over.

Key Action
Space / f Forward one screen
b Back one screen
Arrows / j / k Line by line
g Go to the beginning of the document
G Go to the end
50g Go to line 50
/text Search forwards
?text Search backwards
n Next match
N Previous match
&text Show only the lines containing the text
h Help for less itself
q Quit

The real workflow of somebody with experience is not to read the page: it is to go in and search.

Suppose you want to know what the -h option of du does. Instead of walking through the page:

operator@srv-tramontana:~$ man du

Inside, type /-h and Enter. less jumps to the first occurrence; with n you move forward to the one in the OPTIONS section:

       -h, --human-readable
              print sizes in human readable format (e.g., 1K 234M 2G)

A very useful trick: to look for one specific option and avoid the dozens of stray appearances of that letter, search for the pattern with spaces:

/^       -h

The ^ means "at the beginning of the line" and manual pages indent their options, so this jumps straight to the definition. (That ^ is a regular expression; the full topic belongs to lesson 03-02, but you can adopt this one isolated use right away.)

And a practical warning: if you are inside man and do not know how to get out, it is q. It is the most frequently asked question of the whole course.

  1. --help: the quick summary

Almost every command accepts --help (or -h) and answers with a summary in the terminal itself, with no pager:

operator@srv-tramontana:~$ head --help
Usage: head [OPTION]... [FILE]...
Print the first 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the file name.

Mandatory arguments to long options are mandatory for short
options too.
  -c, --bytes=[-]NUM       print the first NUM bytes of each file
  -n, --lines=[-]NUM       print the first NUM lines instead of the first 10
  -q, --quiet              never print headers giving file names
  -v, --verbose            always print headers giving file names
      --help     display this help and exit
      --version  output version information and exit

Differences from man:

--help man
Origin It is inside the executable A separate file, from the documentation package
Length One screen Complete
Availability Almost always May be missing in minimal containers
Explanations Terse With context, examples and nuance
Currency Always matches the binary Very occasionally it can fall out of date

That last point has a practical consequence: in a minimal Docker container (Module 7) there are usually no manual pages installed, because they are removed to reduce the image size. There, --help is all you have.

Watch out for one detail: in some commands, -h does not mean "help". In ls, du and df it means human-readable. If in doubt, use --help, which is unambiguous.

And another: when the output of --help does not fit on the screen, do not chase it upwards. Send it to the pager:

operator@srv-tramontana:~$ rsync --help | less

That | is a pipe; it is explained thoroughly in lesson 03-04, but you can adopt this use from today.

  1. info: the extensive GNU documentation

The GNU project decided at the time that manual pages were too limited for documenting its tools and created its own system: Texinfo, which you consult with info. It is organised into linked nodes, like a book with navigable chapters.

operator@srv-tramontana:~$ info coreutils

A practical consequence worth knowing: in the GNU tools (ls, cp, mv, tar, grep, sed...), the manual page is often a summary and the real documentation is in info. Many pages end with an explicit note:

       Full documentation <https://www.gnu.org/software/coreutils/ls>
       or available locally via: info '(coreutils) ls invocation'

Basic info navigation:

Key Action
Space / Backspace Forward / back
n Next node at the same level
p Previous node
u Go up to the parent node
Enter on a * Enter that node
l Return to the previously visited node
s Search
q Quit

When info is worth the trouble: when man gives you the option but not the why. For instance, to understand the exact behaviour of cp with symbolic links, or the formats of date, info explains the edge cases that man merely lists.

If you find info awkward (many people do, because of its node-based navigation), there is a way out:

operator@srv-tramontana:~$ info coreutils 'ls invocation' | less

That way you read the same content in less, with the shortcuts you already know.

  1. help: the Bash builtins and why man cd does not work

Try this:

operator@srv-tramontana:~$ man cd
No manual entry for cd

The explanation is in the previous lesson: cd is not a program, it is a Bash internal command. No package installs it, so there is no manual page documenting it. Its documentation is provided by Bash itself through the help builtin:

operator@srv-tramontana:~$ help cd
cd: cd [-L|[-P [-e]] [-@]] [dir]
    Change the shell working directory.

    Change the current directory to DIR.  The default DIR is the value of
    the HOME shell variable.
    ...

And the complete list of builtins, which is worth looking at once in your life:

operator@srv-tramontana:~$ help
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
...
 alias [-p] [name[=value] ... ]          cd [-L|[-P [-e]] [-@]] [dir]
 bg [job_spec ...]                       command [-pVv] command [arg ...]
 ...

The complete decision tree:

flowchart TD
    A["I need documentation for 'X'"] --> B{"type X"}
    B -->|"is a shell builtin"| C["help X"]
    B -->|"is /path/to/program"| D["man X"]
    B -->|"is an alias"| E["type -a X<br/>and document the real command"]
    D --> F{"Does the page exist?"}
    F -->|Yes| G["Read and search with /"]
    F -->|"No manual entry"| H["X --help"]
    G --> I{"Enough?"}
    I -->|No| J["info X<br/>/usr/share/doc/X/"]
    I -->|Yes| K[Solved]

There is an intermediate case worth knowing about: man builtins shows all the documented builtins on a single page, and man bash contains the shell's complete documentation. It is one of the longest manual pages on the system (more than five thousand lines), and for that very reason /word is indispensable in there.

  1. Local documentation in /usr/share/doc

Every installed package leaves documentation in /usr/share/doc/<package>/. It is the most ignored source and the one that most often contains exactly what you need: example configuration files.

operator@srv-tramontana:~$ ls /usr/share/doc/openssh-server/
NEWS.Debian.gz  README.Debian.gz  changelog.Debian.gz  copyright
examples/       faq.html

What to expect in each type of file:

File Contents
README.Debian How Debian/Ubuntu packages this tool: paths and decisions specific to the distro
NEWS.Debian Important changes that may break your configuration on upgrade
changelog.Debian.gz The package's version history
examples/ Example configuration files, pure gold
copyright Licence

Many are compressed as .gz. You read them without decompressing with zless or zcat:

operator@srv-tramontana:~$ zless /usr/share/doc/rsyslog/changelog.Debian.gz

README.Debian is especially valuable because it documents the differences between the original tool and the way Ubuntu packages it: changed paths, different defaults, systemd integration. That does not appear in the project's official documentation and it is the cause of half the confusion when you follow a tutorial written for another distribution.

When you get to configuring services in Module 5 and Module 8, this folder will be your first stop, ahead of any tutorial.

  1. tldr and cheat: the complement, not the substitute

tldr (from too long; didn't read) is a community collection of practical examples. Where man tar gives you a thousand lines, tldr tar gives you the six invocations used 95 % of the time.

operator@srv-tramontana:~$ tldr tar

  tar
  Archiving utility.

  - Create an archive from files:
    tar cf target.tar file1 file2 file3

  - Create a gzipped archive:
    tar czf target.tar.gz file1 file2 file3

  - Extract a (compressed) archive into the current directory:
    tar xf source.tar[.gz|.bz2|.xz]

  - List the contents of a tar file:
    tar tvf source.tar

It is enormously useful, and you have to be aware of its three limits:

  1. It is not exhaustive. It shows the common case, not what you need in a rare one. And rare cases are precisely what incidents are made of.
  2. It is not official. The community writes it; it may be out of date with respect to your version.
  3. It may not be installed, and on a production server it probably is not (and you probably should not install it just for that).

Professional criterion: tldr to get going quickly with a tool you already understand; man to decide something that is going to production. If you are about to run a destructive command or modify the configuration of a running service, the source is the manual.

  1. Exit codes and $?: knowing whether something failed

Remember from section 9 of the previous lesson: every command returns a number when it finishes. Now we are going to look at it directly, because it is the information that tells you whether something worked when the command said nothing.

operator@srv-tramontana:~$ ls /var/log/tramontana
access.log  errors.log
operator@srv-tramontana:~$ echo $?
0

operator@srv-tramontana:~$ ls /var/log/nonexistent
ls: cannot access '/var/log/nonexistent': No such file or directory
operator@srv-tramontana:~$ echo $?
2

$? holds the code of the last command run. The universal convention:

Code Meaning
0 Success
1 Generic error
2 Incorrect usage (invalid option, missing arguments)
126 The file exists but is not executable
127 Command not found
128+N Terminated by signal N (130 = interrupted with Ctrl+C)

Each command can define its own, and that is where the EXIT STATUS section of the manual comes in:

operator@srv-tramontana:~$ man grep

Searching for /EXIT STATUS:

EXIT STATUS
       Normally the exit status is 0 if a line is selected, 1 if no lines
       were selected, and 2 if an error occurred.

That means that in grep, 1 is not a failure: it means "no matches". Confusing "found nothing" with "broke" is a classic source of bugs in monitoring scripts. And the only way to know is by reading that section of the manual.

Watch out for one trap: $? is overwritten by every command, including the echo that displays it.

operator@srv-tramontana:~$ ls /nonexistent
ls: cannot access '/nonexistent': No such file...
operator@srv-tramontana:~$ echo $?
2
operator@srv-tramontana:~$ echo $?
0

That second 0 is the code of the previous echo, which worked perfectly. Check $? immediately, or store it in a variable (Module 4).

  1. A search strategy for when you do not even know the name

This is the complete procedure, in order, for when you face a problem without knowing which tool solves it:

  1. Describe the problem in two or three words in English. "space", "compress", "rename", "monitor processes".
  2. apropos with those words, narrowing down with -s 1 or -s 8.
  3. From the list, whatis on the candidates, to discard them quickly.
  4. man on the chosen one: read NAME, SYNOPSIS and jump to EXAMPLES.
  5. If it was not the right one, the SEE ALSO of that page usually contains the one that is.
  6. If the command exists but you do not know how to use it, tldr for a quick start, then back to the manual for the details.
  7. If it is a configuration file, man 5 <name> and /usr/share/doc/<package>/examples/.
  8. If it is a command with no manual, type will tell you whether it is a builtin and then help.

A complete run-through. Marta Vidal asks how much space the application's directory takes up:

operator@srv-tramontana:~$ apropos -s 1 "file space"
du (1)               - estimate file space usage

operator@srv-tramontana:~$ whatis du
du (1)               - estimate file space usage

operator@srv-tramontana:~$ man du

Inside the manual, /summarize:

       -s, --summarize
              display only a total for each argument

And /human:

       -h, --human-readable
              print sizes in human readable format (e.g., 1K 234M 2G)

The result, without leaving the server and without a search engine:

operator@srv-tramontana:~$ du -sh /opt/tramontana/app
48M	/opt/tramontana/app

Three commands and two searches inside one page. That is the method.

Common Mistakes and Tips

Not knowing how to get out of man. It is q. If you are in info, also q. If you have ended up in vim by accident, it is :q! (lesson 02-05).

Reading the whole page from top to bottom. Manual pages are reference material, not tutorials. Go in and search with /.

Ignoring the section number. If man passwd talks to you about changing passwords and you were after the file format, it is not that the manual is wrong: you are missing the 5.

Searching the internet before apropos. The search engine will give you an answer written for another distribution, another version and another year. man documents exactly the binary you have installed.

Copying a command from a forum without reading its options. Before running something you do not understand, put its options through man. It literally takes a minute, and it is the difference between resolving one incident and causing another.

Tip: man -k is your local search engine. Get into the habit of trying it before opening the browser. In the first week it will feel slower; from the third week on you will be faster.

Tip: save what you learn. Create /home/operator/scripts/notes/ and write down there the commands you have had to look up. Your own documentation, with your own cases, is quicker to consult than any manual.

Tip: read man 7 hier once. It is the FHS from Module 1 told by the system itself. Half an hour well spent.

Tip: on a server with no manual pages, check whether they are disabled before giving them up for lost. Some images exclude them in the package installation configuration; how to get them back is the subject of lesson 05-03.

Exercises

Exercise 1: mastering the SYNOPSIS

Without running the commands, only by reading their manual pages, answer:

  1. Does mkdir accept creating several directories in a single command? How do you know from the SYNOPSIS?
  2. How many different invocation forms does ln have?
  3. In man 1 tar, are -c, -x and -t compatible with each other?

Exercise 2: Luis Ferrer's question

Luis writes to you: "I need to keep only the last 50 lines of /var/log/tramontana/access.log and I cannot remember the command. I also want to watch it updating live while I test the application. Can you Google it for me?"

Constraint: srv-tramontana is on a network with no internet access. Solve it using only system documentation, and document the path you followed (which search commands you used and in what order).

Exercise 3: a documentation report for Marta

Marta Vidal wants to know exactly what the line 0 3 * * * /home/operator/scripts/backup.sh does — it appears in the scheduled task configuration of the previous server — and whether the format is reliable.

Using only the system manual, find out:

  1. Which manual section documents the format of that file (not the command).
  2. What each of the five fields means.
  3. What exit code the crontab command returns if the file has a syntax error.

Write the answer as a short paragraph addressed to Marta, who is not technical.

Solutions

Solution 1

operator@srv-tramontana:~$ man mkdir
SYNOPSIS
       mkdir [OPTION]... DIRECTORY...

Yes, it accepts several. The proof is in the ellipsis after DIRECTORY: it means "one or more". And since DIRECTORY appears without brackets, at least one is mandatory. All that information is in a single line, without reading a word of prose.

operator@srv-tramontana:~$ man ln
SYNOPSIS
       ln [OPTION]... [-T] TARGET LINK_NAME
       ln [OPTION]... TARGET
       ln [OPTION]... TARGET... DIRECTORY
       ln [OPTION]... -t DIRECTORY TARGET...

Four forms. Look at the second one: ln TARGET with no link name. It creates the link in the current directory with the same name as the target. It is a detail that takes people by surprise and that you only learn by reading the SYNOPSIS. You will use it in lesson 02-06.

operator@srv-tramontana:~$ man tar
       Operation mode:
        -c, --create               create a new archive
        -x, --extract, --get       extract files from an archive
        -t, --list                 list the contents of an archive

They are grouped under the heading "Operation mode", which indicates that you choose one and only one. The page confirms it further up:

       The main operation mode:  -A -c -d -r -t -u -x

They are not compatible. Trying tar -cx gives an error along the lines of "You may not specify more than one -Acdtrux option". The clue was in the organisation of the page itself: when a manual groups options under a "mode" heading, they are usually mutually exclusive.

Solution 2

The path followed.

First, search the manual by concept:

operator@srv-tramontana:~$ apropos -s 1 "last part of files"
tail (1)             - output the last part of files

Confirm it is what it looks like:

operator@srv-tramontana:~$ whatis tail head
tail (1)             - output the last part of files
head (1)             - output the first part of files

Go to the manual and search inside it for how to set the number of lines. Inside man tail, /lines:

       -n, --lines=[+]NUM
              output the last NUM lines, instead of the last 10

And for the second part, following the file live, /follow:

       -f, --follow[={name|descriptor}]
              output appended data as the file grows

       -F     same as --follow=name --retry

The two commands that answer Luis's request:

operator@srv-tramontana:~$ sudo tail -n 50 /var/log/tramontana/access.log
2026-08-18 09:12:44 GET /houses 200 user=anon
...
2026-08-18 09:14:11 GET /houses 200 user=anon

operator@srv-tramontana:~$ sudo tail -f /var/log/tramontana/access.log

You leave follow mode with Ctrl+C.

The nuance the documentation contributes and that a quick search-engine answer would not have given: the difference between -f and -F. -f follows the file descriptor; if logrotate rotates the log at midnight and creates a new one, tail -f carries on staring at the old, now renamed file, and stops showing anything without warning. -F follows the name, so it reattaches to the new file.

To follow a production log that rotates, the correct option is tail -F. That is literally in the manual page, and it is exactly the kind of detail a three-line tutorial leaves out. We will come back to it in lesson 02-05.

What you reply to Luis is not the command: it is the method. apropos with two English words, whatis to confirm and /option inside the manual. Thirty seconds, with no internet.

Solution 3

1. Manual section. The crontab command is in section 1, but the file format is in section 5:

operator@srv-tramontana:~$ man -f crontab
crontab (1)          - maintain crontab files for individual users
crontab (5)          - tables for driving cron

operator@srv-tramontana:~$ man 5 crontab

2. The five fields. Inside the page, searching for /field:

       field          allowed values
       -----          --------------
       minute         0-59
       hour           0-23
       day of month   1-31
       month          1-12 (or names)
       day of week    0-7 (0 and 7 are Sunday, or names)

Applied to 0 3 * * *: minute 0, hour 3, any day of the month, any month, any day of the week. That is, every day at 3:00.

3. Exit code on a syntax error. In man 1 crontab, searching for /EXIT:

EXIT STATUS
       An exit status of 0 is returned upon successful completion, and a
       non-zero value otherwise.

And in the DIAGNOSTICS section of the same page it is explained that a file with syntax errors is rejected outright: crontab does not install a partial version. That nuance is the important one for Marta, and it only turns up by reading the page.

Report for Marta:

Marta, the line 0 3 * * * /home/operator/scripts/backup.sh is a scheduled system task. The first five values are a clock: minute 0, hour 3, and the three asterisks mean "any day, any month, any day of the week". Taken together: the backup script runs automatically every day at 3:00 in the morning.

On the reliability of the format: it is the Unix standard, it has been in use for more than forty years and it is documented on the system itself. When a task is installed, the program validates the syntax and rejects the whole file if there is an error, rather than accepting it halfway. That means a badly written task does not get installed, instead of getting installed and running at the wrong time.

The one caveat is that the format says when the script is launched, it does not guarantee that the script works. Verifying that the backup is actually being made requires reviewing its execution log, something I suggest we set up once we have the monitoring system running.

All the information in this report came from two manual pages installed on the server itself.

Conclusion

You no longer depend on a search engine to work on Linux.

  • A Linux system brings five documentation sources: man to understand, --help to recall, info to go deep, help for the builtins and /usr/share/doc to configure.
  • You know how to read a manual page by jumping to what you need: EXAMPLES first when it exists, FILES to locate configuration, EXIT STATUS before scripting and SEE ALSO when you have picked the wrong tool.
  • You understand the SYNOPSIS notation: brackets for the optional, ellipses for the repeatable, bars for the mutually exclusive, and several lines for several invocation forms.
  • You know the eight sections, and in particular the difference between man 1 passwd and man 5 passwd, which is the trap everybody falls into.
  • You can search without knowing the name with apropos and confirm with whatis.
  • You move around inside less with /, n, N, g, G and q, shortcuts you will reuse for reading files and logs.
  • You know why man cd does not exist and what to do instead.
  • And you know how to read the exit code with $?, and that a 1 does not always mean an error, as grep demonstrates.

You have the interpreter and you have the manual. What is missing is the terrain. In the next lesson, Navigating the File System, you will go down into the tree you met in Module 1, but this time to walk it: pwd and the working directory, cd in all its forms including the ones almost nobody uses, ls broken down column by column, tree, stat with its three timestamps, file to know what a file really is, and du/df to see how much space /var/log/tramontana takes up. At the end you will do a complete, documented tour of the Tramontana Bookings tree. And when something does not add up, you already know where to look before asking.

Linux Course: From Beginner to System Administrator

Module 1: Introduction to Linux

Module 2: Basic Linux Commands

Module 3: Advanced Command-Line Skills

Module 4: Shell Scripting

Module 5: System Administration

Module 6: Networking and Security

Module 7: Advanced Topics

Module 8: Practical Projects

© Copyright 2026. All rights reserved