1.1. Using This Book
The book is organized by administrative task rather than by command. Chapters build on one another, but each one names the chapters that cover prerequisites and related procedures, so a reader who already knows the basics can move directly to the task at hand.
1.1.1. Following Procedures and Command Conventions
Commands entered in an ordinary user's shell begin with $, and commands
entered in a root shell begin with #. The marker is part of the
documentation, not part of the command: do not type it. A command that starts
with $ sudo is entered by an ordinary user who is elevating that one command;
a command that starts with # is already running in a root shell. Within a
transcript, the prompt distinguishes the command from the unprefixed output
printed below it.
| Convention | Meaning |
|---|---|
$ command |
Entered in an ordinary user's shell. |
# command |
Entered in a root shell. |
$ sudo command |
Entered by an ordinary user, elevating one command. |
[...] |
Lines omitted from a longer output. |
console block |
A command with its output; the prompt is not typed. |
text block |
Standalone logs or the contents of a file. |
The examples show commands as entered by john, an ordinary account on a
single Debian 13.7 amd64 system named trixie at the address
192.168.121.39. john works in his own home directory and administers the
system through sudo, which asks for his password; Section 1.3.3 demonstrates
that arrangement. The system is a KVM virtual machine - Section 1.3.2 shows
how that is detected - so its hardware is virtual, but every command shown
behaves the same way on other deployment models.
Two commands confirm the account and the working context at the start of a session:
$ whoami
john
$ pwd
/home/john
whoami prints the effective account name, and pwd prints the working
directory. A login shell starts in the account's home directory, where ~
expands to /home/john; the two spellings name the same place.
The first example reads the file that identifies the installed release:
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.7
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
The command prints the contents of a text file, so the output is the file's
data. VERSION_ID is the major release, VERSION_CODENAME is the release
name, and DEBIAN_VERSION_FULL records the point release. The ID value is
useful in scripts that need to distinguish Debian from a derivative.
Shell operators are separate from command options. A pipe, |, sends the
standard output of one command to the standard input of the next; this book
uses pipes with sed or grep to select part of a long document. The operator
> writes standard output to a file, replacing the file if it exists, >>
appends, and 2> redirects standard error. The operator && runs the next
command only if the previous command succeeds. A command that writes a file
does not print the file's contents to the terminal; read the file back with a
separate command to verify it. A command that is normally silent is described
as such rather than followed by an invented output block.
Example files, downloads, and practice data belong in a named workspace under the home directory rather than scattered across the system. Create the workspace once, then give each task its own subdirectory:
$ mkdir -p ~/debian-handbook/introduction
mkdir -p creates the directory and any missing parent directories and
normally produces no output; it prints a message only on failure. The next
listing confirms the result:
$ ls -ld ~/debian-handbook/introduction
drwxrwxr-x 2 john john 4096 Nov 18 05:00 /home/john/debian-handbook/introduction
The directory exists and is owned by john and john's personal group. Make it the working directory:
$ cd ~/debian-handbook/introduction && pwd
/home/john/debian-handbook/introduction
cd changes the working directory and prints nothing; pwd confirms the new
location. Joined with &&, the pair shows the conditional operator: pwd
runs only if cd succeeded. Relative paths in the rest of this chapter refer
to this directory.
A redirection writes a file, not the terminal:
$ grep '^VERSION_ID=' /etc/os-release > release-id.txt
There is no output again: grep matched its line and wrote it to the file
named after >. Read the file back to see what was written:
$ cat release-id.txt
VERSION_ID="13"
The file holds exactly the line grep selected from /etc/os-release. Remove
it now that the redirection is demonstrated:
$ rm release-id.txt
rm is also silent on success, and the file no longer exists. Cleanup in this
book stays inside ~/debian-handbook; nothing outside the workspace is touched
by these examples.
The outputs in this chapter are captured from the example system. Where a long listing is shortened, the block is labelled as selected output and the omitted material is identified. A shortened listing is still a single command's output, not a combination of several runs.
1.1.2. Choosing a Desktop or Server Reading Path
Both reading paths begin with installation and the command line, then diverge. A desktop needs display, audio, printing, and power-management work. A server needs package maintenance, services, network configuration, remote access, and a recovery plan. Storage and security appear in both paths, but with different emphasis.
| If you are building | Read next | Then | Keep nearby |
|---|---|---|---|
| Desktop workstation | Chapter 2, Installing Debian | Chapter 4, Desktop Environments, and Chapters 11-12 | Chapters 3, 5, 6, 15, 20, 26 |
| Server or virtual machine | Chapter 2, Installing Debian | Chapters 3, 6, 8, 17 | Chapters 11-13, 15, 20, 24-25, 26, 28 |
| Existing system to administer | Chapter 3, System Basics | Chapter 6, Packages, and Chapter 17, Network Configuration | Chapters 8, 15, 20, 26, 29 |
Figure 1.1. Desktop and server reading paths. The map is conceptual: chapters can be read in a different order when a task requires it.
A desktop installation is not simply a server with extra packages. Graphical sessions consume memory, depend on firmware and kernel drivers, and add a login manager and user-session services. A server can be administered entirely over SSH, but it needs a reliable network path, a firewall policy, and a way to recover if the network configuration fails. Starting with the appropriate chapter avoids installing software that the role does not need and avoids leaving out access that the role does need.
1.1.3. Finding Related Procedures Through Cross-References
A cross-reference names the chapter and, where useful, the section that owns a procedure. Follow the reference instead of repeating a partial version of the procedure in a second place: the second version is likely to omit a prerequisite or drift out of date. For example, adding a disk, creating a filesystem, and extending a logical volume are separate procedures owned by Chapters 11, 12, and 13 even though they are often performed in one maintenance window.
| When you need to | Go to |
|---|---|
| Install Debian and choose partitioning | Chapter 2, Installing Debian |
| Learn shell syntax, privileges, and file handling | Chapter 3, System Basics |
| Install or troubleshoot a graphical desktop | Chapter 4, Desktop Environments |
| Add, remove, or upgrade packages | Chapter 6, Packages and Repositories |
| Configure services and read the journal | Chapter 8, Services and Logs |
| Add a disk, partition, or filesystem | Chapter 11, Chapter 12 |
| Configure LVM, RAID, or encryption | Chapter 13, Storage Layers |
| Configure interfaces, addresses, and routes | Chapter 17, Network Configuration |
| Enable remote administration | Chapter 20, Secure Remote Administration |
| Build virtual machines or containers | Chapter 24, Chapter 25 |
| Back up, restore, or repair a system | Chapter 15, Chapter 16 |
| Upgrade to a new Debian release | Chapter 29, Release Upgrades |
Manual pages provide a second kind of cross-reference. A page's SEE ALSO
section names related commands, file formats, and configuration files, often
with the section number required to disambiguate them. Section 1.4.1 explains
how to read those references.