Product SiteDocumentation Site

Debian 10

The Debian Administrator's Handbook

Debian Buster from Discovery to Mastery

Edició 1

Hertzog, Raphaël

Avís legal

ISBN: 979-10-91414-19-7 (English paperback)
ISBN: 979-10-91414-20-3 (English ebook)
This book is available under the terms of two licenses compatible with the Debian Free Software Guidelines.
Creative Commons License Notice:
This book is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
GNU General Public License Notice:
This book is free documentation: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This book is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see

Show your appreciation

This book is published under a free license because we want everybody to benefit from it. That said maintaining it takes time and lots of effort, and we appreciate being thanked for this. If you find this book valuable, please consider contributing to its continued maintenance either by buying a paperback copy or by making a donation through the book's official website:


A reference book presenting the Debian distribution, from initial installation to configuration of services.
1. Per què aquest llibre?
2. Per a qui és aquest llibre?
3. Enfocament general
4. Estructura del llibre
5. Contribuir
6. Reconeixements
6.1. Un xic d'història
6.2. Agraïments especials als contribuïdors
6.3. Gràcies als traductors
6.4. Reconeixements personals del Raphaël
6.5. Agraïments personals del Roland
1. El Projecte Debian
1.1. Què és Debian?
1.1.1. Un sistema operatiu multiplataforma
1.1.2. La qualitat del programari lliure
1.1.3. El Marc Legal: Una Organització Sense Ànim de Lucre
1.2. Els documents de la fundació
1.2.1. El Compromís envers els Usuaris
1.2.2. Les Directrius sobre Programari Lliure de Debian
1.3. El funcionament intern del projecte Debian
1.3.1. Els desenvolupadors Debian
1.3.2. El paper actiu dels usuaris
1.3.3. Equips i subprojectes
1.4. Segueix les notícies de Debian
1.5. El rol de les distribucions
1.5.1. L'instal·lador: debian-installer
1.5.2. La biblioteca de programari
1.6. Cicle de vida d'una versió
1.6.1. L'estat Experimental
1.6.2. L'estat Unstable
1.6.3. Migració a Testing
1.6.4. La promoció des de Testing a Stable
1.6.5. L'estat de Oldstable i Oldoldstable
2. Presentant el cas d'estudi
2.1. Necessitats de TI pel creixement ràpid
2.2. Pla mestre
2.3. Per què una distribució GNU/Linux?
2.4. Per què la distribució de Debian?
2.4.1. Distribucions comercials i guiades per la comunitat
2.5. Per què Debian Buster?
3. Anàlisi de la instal·lació existent i migració
3.1. Coexistència en entorns heterogenis
3.1.1. Integració amb ordinadors Windows
3.1.2. Integració amb equips OS X
3.1.3. Integració amb altres màquines Linux/Unix
3.2. Com migrar
3.2.1. Recerca i identificació de serveis
3.2.2. Fent còpies de seguretat de la configuració
3.2.3. Adaptant un servidor Debian existent
3.2.4. Instal·lant Debian
3.2.5. Instal·lació i configuració dels serveis seleccionats
4. Instal·lació
4.1. Mètodes d'instal·lació
4.1.1. Instal·lació des d'un CD-ROM/DVD-ROM
4.1.2. Arrencada des d'un llapis USB
4.1.3. Instal·lant a través de l’arrencada en xarxa
4.1.4. Altres mètodes d'instal·lació
4.2. Instal·lació, pas a pas
4.2.1. Arrencada i inici de l’instal·lador
4.2.2. Selecció de l'idioma
4.2.3. Selecció del país
4.2.4. Selecció de la disposició del teclat
4.2.5. Detectant el maquinari
4.2.6. Carregant components
4.2.7. Detectant el maquinari de xarxa
4.2.8. Configurar la xarxa
4.2.9. Contrasenya de l'administrador
4.2.10. Creant el primer usuari
4.2.11. Configurar el rellotge
4.2.12. Detectant discos i altres dispositius
4.2.13. Inici de l'eina de particionat
4.2.14. Instal·lació del sistema base
4.2.15. Configuració del gestor de paquets (apt)
4.2.16. Concurs de popularitat de paquets Debian
4.2.17. Selecció de paquets para instal·lació
4.2.18. Instal·lant el gestor d'arrencada GRUB
4.2.19. Finalitzant la instal·lació i reiniciant
4.3. Després de la primera arrencada
4.3.1. Instal·lant programari addicional
4.3.2. Actualitzant el sistema
5. Sistema de paquets: eines i principis fonamentals
5.1. Estructura d'un paquet binari
5.2. Meta-informació del paquet
5.2.1. Descripció: l'arxiu control
5.2.2. Scripts de configuració
5.2.3. Checksums, List of Configuration Files
5.3. Structure of a Source Package
5.3.1. Format
5.3.2. Usage within Debian
5.4. Manipulating Packages with dpkg
5.4.1. Installing Packages
5.4.2. Eliminació de paquets
5.4.3. Querying dpkg's Database and Inspecting .deb Files
5.4.4. dpkg's Log File
5.4.5. Multi-Arch Support
5.5. Coexistence with Other Packaging Systems
6. Maintenance and Updates: The APT Tools
6.1. Filling in the sources.list File
6.1.1. Syntax
6.1.2. Repositories for Stable Users
6.1.3. Repositories for Testing/Unstable Users
6.1.4. Using Alternate Mirrors
6.1.5. Non-Official Resources:
6.1.6. Caching Proxy for Debian Packages
6.2. aptitude, apt-get, and apt Commands
6.2.1. Initialization
6.2.2. Installing and Removing
6.2.3. System Upgrade
6.2.4. Configuration Options
6.2.5. Managing Package Priorities
6.2.6. Working with Several Distributions
6.2.7. Tracking Automatically Installed Packages
6.3. The apt-cache Command
6.4. The apt-file Command
6.5. Frontends: aptitude, synaptic
6.5.1. aptitude
6.5.2. synaptic
6.6. Checking Package Authenticity
6.7. Upgrading from One Stable Distribution to the Next
6.7.1. Recommended Procedure
6.7.2. Handling Problems after an Upgrade
6.7.3. Cleaning Up after an Upgrade
6.8. Keeping a System Up to Date
6.9. Automatic Upgrades
6.9.1. Configuring dpkg
6.9.2. Configuring APT
6.9.3. Configuring debconf
6.9.4. Handling Command Line Interactions
6.9.5. The Miracle Combination
6.10. Searching for Packages
7. Solving Problems and Finding Relevant Information
7.1. Documentation Sources
7.1.1. Manual Pages
7.1.2. info Documents
7.1.3. Specific Documentation
7.1.4. Websites
7.1.5. Tutorials (HOWTO)
7.2. Common Procedures
7.2.1. Configuring a Program
7.2.2. Monitoring What Daemons Are Doing
7.2.3. Asking for Help on a Mailing List
7.2.4. Reporting a Bug When a Problem Is Too Difficult
8. Basic Configuration: Network, Accounts, Printing...
8.1. Configuring the System for Another Language
8.1.1. Setting the Default Language
8.1.2. Configuring the Keyboard
8.1.3. Migrating to UTF-8
8.2. Configurar la xarxa
8.2.1. Ethernet Interface
8.2.2. Wireless Interface
8.2.3. Connecting with PPP through a PSTN Modem
8.2.4. Connecting through an ADSL Modem
8.2.5. Automatic Network Configuration for Roaming Users
8.3. Setting the Hostname and Configuring the Name Service
8.3.1. Name Resolution
8.4. User and Group Databases
8.4.1. User List: /etc/passwd
8.4.2. The Hidden and Encrypted Password File: /etc/shadow
8.4.3. Modifying an Existing Account or Password
8.4.4. Disabling an Account
8.4.5. Group List: /etc/group
8.5. Creating Accounts
8.6. Shell Environment
8.7. Printer Configuration
8.8. Configuring the Bootloader
8.8.1. Identifying the Disks
8.8.2. Configuring LILO
8.8.3. GRUB 2 Configuration
8.9. Other Configurations: Time Synchronization, Logs, Sharing Access…
8.9.1. Timezone
8.9.2. Time Synchronization
8.9.3. Rotating Log Files
8.9.4. Sharing Administrator Rights
8.9.5. List of Mount Points
8.9.6. locate and updatedb
8.10. Compiling a Kernel
8.10.1. Introduction and Prerequisites
8.10.2. Getting the Sources
8.10.3. Configuring the Kernel
8.10.4. Compiling and Building the Package
8.10.5. Compiling External Modules
8.10.6. Applying a Kernel Patch
8.11. Installing a Kernel
8.11.1. Features of a Debian Kernel Package
8.11.2. Installing with dpkg
9. Unix Services
9.1. System Boot
9.1.1. The systemd init system
9.1.2. The System V init system
9.2. Remote Login
9.2.1. Secure Remote Login: SSH
9.2.2. Using Remote Graphical Desktops
9.3. Managing Rights
9.4. Administration Interfaces
9.4.1. Administrating on a Web Interface: webmin
9.4.2. Configuring Packages: debconf
9.5. syslog System Events
9.5.1. Principle and Mechanism
9.5.2. The Configuration File
9.6. The inetd Super-Server
9.7. Scheduling Tasks with cron and atd
9.7.1. Format of a crontab File
9.7.2. Using the at Command
9.8. Scheduling Asynchronous Tasks: anacron
9.9. Quotas
9.10. Backup
9.10.1. Backing Up with rsync
9.10.2. Restoring Machines without Backups
9.11. Hot Plugging: hotplug
9.11.1. Introduction
9.11.2. The Naming Problem
9.11.3. How udev Works
9.11.4. A concrete example
9.12. Power Management: Advanced Configuration and Power Interface (ACPI)
10. Network Infrastructure
10.1. Gateway
10.2. X.509 certificates
10.2.1. Creating gratis trusted certificates
10.2.2. Public Key Infrastructure: easy-rsa
10.3. Virtual Private Network
10.3.1. OpenVPN
10.3.2. Virtual Private Network with SSH
10.3.3. IPsec
10.3.4. PPTP
10.4. Quality of Service
10.4.1. Principle and Mechanism
10.4.2. Configuring and Implementing
10.5. Dynamic Routing
10.6. IPv6
10.6.1. Tunneling
10.7. Domain Name Servers (DNS)
10.7.1. DNS software
10.7.2. Configuring bind
10.8. DHCP
10.8.1. Configuring
10.8.2. DHCP and DNS
10.9. Network Diagnosis Tools
10.9.1. Local Diagnosis: netstat
10.9.2. Remote Diagnosis: nmap
10.9.3. Sniffers: tcpdump and wireshark
11. Network Services: Postfix, Apache, NFS, Samba, Squid, LDAP, SIP, XMPP, TURN
11.1. Mail Server
11.1.1. Installing Postfix
11.1.2. Configuring Virtual Domains
11.1.3. Restrictions for Receiving and Sending
11.1.4. Setting Up greylisting
11.1.5. Customizing Filters Based On the Recipient
11.1.6. Integrating an Antivirus
11.1.7. Fighting Spam with SPF, DKIM and DMARC
11.1.8. Authenticated SMTP
11.2. Web Server (HTTP)
11.2.1. Installing Apache
11.2.2. Adding support for SSL
11.2.3. Configuring Virtual Hosts
11.2.4. Common Directives
11.2.5. Log Analyzers
11.3. FTP File Server
11.4. NFS File Server
11.4.1. Securing NFS
11.4.2. NFS Server
11.4.3. NFS Client
11.5. Setting Up Windows Shares with Samba
11.5.1. Samba Server
11.5.2. Samba Client
11.6. HTTP/FTP Proxy
11.6.1. Installing
11.6.2. Configuring a Cache
11.6.3. Configuring a Filter
11.7. LDAP Directory
11.7.1. Installing
11.7.2. Filling in the Directory
11.7.3. Managing Accounts with LDAP
11.8. Real-Time Communication Services
11.8.1. DNS settings for RTC services
11.8.2. TURN Server
11.8.3. SIP Proxy Server
11.8.4. XMPP Server
11.8.5. Running services on port 443
11.8.6. Adding WebRTC
12. Advanced Administration
12.1. RAID and LVM
12.1.1. Software RAID
12.1.2. LVM
12.1.3. RAID or LVM?
12.2. Virtualization
12.2.1. Xen
12.2.2. LXC
12.2.3. Virtualization with KVM
12.3. Automated Installation
12.3.1. Fully Automatic Installer (FAI)
12.3.2. Preseeding Debian-Installer
12.3.3. Simple-CDD: The All-In-One Solution
12.4. Monitoring
12.4.1. Setting Up Munin
12.4.2. Setting Up Nagios
13. Workstation
13.1. Configuring the X11 Server
13.2. Customizing the Graphical Interface
13.2.1. Choosing a Display Manager
13.2.2. Choosing a Window Manager
13.2.3. Menu Management
13.3. Graphical Desktops
13.3.1. GNOME
13.3.2. KDE and Plasma
13.3.3. Xfce and Others
13.3.4. Other Desktop Environments
13.4. Email
13.4.1. Evolution
13.4.2. KMail
13.4.3. Thunderbird
13.5. Web Browsers
13.6. Development
13.6.1. Tools for GTK+ on GNOME
13.6.2. Tools for Qt
13.7. Collaborative Work
13.7.1. Working in Groups: groupware
13.7.2. Collaborative Work With FusionForge
13.8. Office Suites
13.9. Emulating Windows: Wine
13.10. Real-Time Communications software
14. Security
14.1. Defining a Security Policy
14.2. Firewall or Packet Filtering
14.2.1. nftables Behavior
14.2.2. Moving from iptables to nftables
14.2.3. Syntax of nft
14.2.4. Installing the Rules at Each Boot
14.3. Supervision: Prevention, Detection, Deterrence
14.3.1. Monitoring Logs with logcheck
14.3.2. Monitoring Activity
14.3.3. Avoiding Intrusion
14.3.4. Detecting Changes
14.3.5. Detecting Intrusion (IDS/NIDS)
14.4. Introduction to AppArmor
14.4.1. Principles
14.4.2. Enabling AppArmor and managing AppArmor profiles
14.4.3. Creating a new profile
14.5. Introduction to SELinux
14.5.1. Principles
14.5.2. Setting Up SELinux
14.5.3. Managing an SELinux System
14.5.4. Adapting the Rules
14.6. Other Security-Related Considerations
14.6.1. Inherent Risks of Web Applications
14.6.2. Knowing What To Expect
14.6.3. Choosing the Software Wisely
14.6.4. Managing a Machine as a Whole
14.6.5. Users Are Players
14.6.6. Physical Security
14.6.7. Legal Liability
14.7. Dealing with a Compromised Machine
14.7.1. Detecting and Seeing the Cracker's Intrusion
14.7.2. Putting the Server Off-Line
14.7.3. Keeping Everything that Could Be Used as Evidence
14.7.4. Re-installing
14.7.5. Forensic Analysis
14.7.6. Reconstituting the Attack Scenario
15. Creating a Debian Package
15.1. Rebuilding a Package from its Sources
15.1.1. Getting the Sources
15.1.2. Making Changes
15.1.3. Starting the Rebuild
15.2. Building your First Package
15.2.1. Meta-Packages or Fake Packages
15.2.2. Simple File Archive
15.3. Creating a Package Repository for APT
15.4. Becoming a Package Maintainer
15.4.1. Learning to Make Packages
15.4.2. Acceptance Process
16. Conclusion: Debian's Future
16.1. Upcoming Developments
16.2. Debian's Future
16.3. Future of this Book
A. Derivative Distributions
A.1. Census and Cooperation
A.2. Ubuntu
A.3. Linux Mint
A.4. Knoppix
A.5. Aptosid and Siduction
A.6. Grml
A.7. Tails
A.8. Kali Linux
A.9. Devuan
A.10. DoudouLinux
A.11. Raspbian
A.12. PureOS
A.13. SteamOS
A.14. And Many More
B. Short Remedial Course
B.1. Shell and Basic Commands
B.1.1. Browsing the Directory Tree and Managing Files
B.1.2. Displaying and Modifying Text Files
B.1.3. Searching for Files and within Files
B.1.4. Managing Processes
B.1.5. System Information: Memory, Disk Space, Identity
B.2. Organization of the Filesystem Hierarchy
B.2.1. The Root Directory
B.2.2. The User's Home Directory
B.3. Inner Workings of a Computer: the Different Layers Involved
B.3.1. The Deepest Layer: the Hardware
B.3.2. The Starter: the BIOS or UEFI
B.3.3. The Kernel
B.3.4. The User Space
B.4. Some Tasks Handled by the Kernel
B.4.1. Driving the Hardware
B.4.2. Filesystems
B.4.3. Shared Functions
B.4.4. Managing Processes
B.4.5. Rights Management
B.5. The User Space
B.5.1. Process
B.5.2. Daemons
B.5.3. Inter-Process Communications
B.5.4. Libraries