Cockpit provides an easy-to-use, web-based interface for administering Linux systems. It simplifies tasks such as monitoring logs, controlling system services, configuring networks, and managing virtual machines.
If you selected a wireless interface as the primary network interface for use during installation of the Debian system, you may need to re-establish connection to the wireless network after rebooting.
$ sudo sed -i 's/managed=false/managed=true/' /etc/NetworkManager/NetworkManager.conf&&sudo sed -i '/# The primary network interface/,$d' /etc/network/interfaces && sudo reboot
Step 4
Access the Cockpit web console on https://localhost:9090 by entering your username and password.
Step 5
By default, the Cockpit web console listens on port 9090 for connections. If you want to make changes from the default, use the following command to edit /etc/systemd/system/cockpit.socket.d/override.conf.
$ sudo systemctl edit cockpit.socket
The example below changes the web console port from 9090 to 9091 and restricts access to the localhost only.
### Editing /etc/systemd/system/cockpit.socket.d/override.conf ### Anything between here and the comment below will become the new contents of the file
If you wish to receive status updates from your Debian or Ubuntu system, you need to install and configure a mail transfer agent (MTA). nullmaileris a relay-only forwarding MTA that can be used as an alternative to more complex MTAs, such as Exim, Sendmail or Postfix.
A relay host, also referred to as a smarthost, can be defined as an email server for outgoing mail that is being afforded a good reputation by its peers. In this example, we use Fastmail because email deliverability depends on a number of different factors.
This guide is intended to assist those who are installing Debian for the first time. It maps out a straightforward path to a GNOME desktop with only essential applications pre-installed. Choose from 69830 official Debian packages and tailor the system to your own requirements.
Debian stable is, above all else, focused on the task of maintaining bug-free software packages. It is the reason why Debian, in over 30 years, has gained a reputation for being “like a rock in an ever-swirling sea of updates“. It is also the reason why Debian stable does not keep up with the latest versions.
Universal package formats, such as Flatpak, Snap, or AppImage, are managed separately from conventional packaging systems and thus provide the end-user with added flexibility and choice. They solve the problem of stale distribution packages because newer versions can be installed without compromising the integrity of the underlying core.
Before you begin
In addition to the target computer, you should have reasonably fast Internet. Use an Ethernet cable to connect your device to the network. If your laptop does not have a built-in Ethernet port, look for a Linux-compatible USB to Ethernet adapter, such as the StarTech USB31000S2, TP-Link UE300C or Plugable USB3-E1000.
Veronica explains how to create a bootable USB stick for installing Linux. Depending on your requirements, there are different Debian CD images to choose from. In all likelihood, you are following these instructions to install on x86-64 hardware, for which a netinst CD image amd64 would be the correct choice. It supports Intel as well as AMD processors and “includes non-free firmware for extra support for some awkward hardware”.
In the instructions which follow, yourhostname is used as the hostname and yourusername as the name for the standard user.
In addition to host- and username, choose 1) yourpassphrase as an encryption passphrase to encrypt your storage device with, 2) yourpassword as a password for the standard user account, and 3) rootpassword as a password for the superuser account.
Ensure that all of your data is safely backed up because formatting your storage device will erase all of its data.
After completing the installation, Debian GNU/Linux will be the only operating system on your computer.
After booting the system from the USB stick that you have prepared, continue by selecting the text-based installer.
Step 2
Keep English as the language for the installation.
[!!] Select a language
Language: English
Step 3
Keep United States as the location for your system. This will also set United States as the default locale for the system environment. You will have an opportunity to set additional locales and adjust time zones at a later point during the installation.
[!!] Select your location
Country, territory or area: United States
Step 4
Use the keymap that is right for the layout of your particular keyboard.
[!!] Configure the keyboard
Keymap to use: keymap for your specific keyboard
Step 5
At this point, the installer may prompt you for missing firmware.
[!] Detect network hardware
Some of your hardware needs non-free firmware files to operate. The firmware can be loaded from removable media, such as a USB stick or floppy.
Load missing firmware from removable media?
No
Step 6
You may be asked to select the primary network interface for use during the installation.
Partitioning method: Guided - use entire disk and set up encrypted LVM
Be careful to select the correct target device for your system.
[!!] Partition disks
Select disk to partition: your target disk for installation
Choose to keep all files in one partition.
[!] Partition disks
Partitioning scheme: All files in one partition (recommended for new users)
Now write the changes to disk.
[!!] Partition disks
Write the changes to disk and configure LVM?
Yes
You may cancel the process of overwriting of the disk with random data. Be aware, however, that skipping this step will diminish the quality of the disk encryption.
Step 12
Enter your encryption passphrase.
[!!] Partition disks
Encryption passphrase: yourpassphrase
Continue
Confirm your encryption passphrase.
[!!] Partition disks
Re-enter passphrase to verify: yourpassphrase
Continue
Step 13
Use the available space to partition your disk.
[!!] Partition disks
Amount of volume group to use for guided partitioning: max
Continue
Step 14
Review partitions and mount points suggested by the installer.
[!!] Partition disks
Finish partitioning and write changes to disk
Confirm writing the changes to disk.
[!!] Partition disks
Write the changes to disks?
Yes
Step 15
You may be asked to scan additional installation media.
[!] Configure the package manager
Scan extra installation media?
No
Step 16
Select your archive mirror country from the list.
[!] Configure the package manager
Debian archive mirror country: your country
Select an archive mirror from the list. Use the site that is closest to you.
[!] Configure the package manager
Debian archive mirror: mirror closest to you
Proceed without providing HTTP proxy information.
[!] Configure the package manager
HTTP proxy information (blank for none): leave empty
From within the GNOME desktop, open Firefox ESR by using the shortcut [Super + b] and re-open these instructions at edafe.de/29.
Open a terminal with the shortcut [Super + t] and, where applicable, copy and paste to enter the following commands. Be careful not to miss any punctuation.
Step 30
Set the time zone for your area.
$ sudo dpkg-reconfigure tzdata
[sudo] password for yourusername: yourpassword
Configuring tzdata
Geographic area: your area
Ok
Step 31
Configure locales for all the languages that your system is going to be used with. Use UTF-8 locales wherever possible.
$ sudo dpkg-reconfigure locales
In this example, German and Japanese locales are generated in addition to the default United States locale that is used for the system environment.
Keep en_US.UTF-8 as the default locale for the system environment.
Configuring locales
Default locale for the system environment:
en_US.UTF-8
OK
Step 32
The Desktop was disabled in GNOME 3.28. This decision was not universally popular at the time. However, developers pointed to the fact that, as an unmaintained feature, it stood in the way of other improvements. The following command hides the now orphaned Desktop folder from view.
$ echo Desktop >> ~/.hidden
Step 33
Install additonal Debian packages to give you a fully functional GNOME desktop.
$ echo -e '\n# use Fastfetch to display information about the system\nif [ -f /usr/bin/fastfetch ]; then\n clear && fastfetch;\nfi' >> ~/.bashrc && source ~/.bashrc
Step 36
Enable the unattended installation of important upgrades.
$ sudo dpkg-reconfigure unattended-upgrades
Step 37
If in Step 6 you selected a wireless interface as the primary network interface for use during the installation, you will need to re-establish connection to the wireless network after rebooting.
The snap directory in your home folder is not supposed to be accessed manually. Use the following command to hide it from view.
$ echo snap >> ~/.hidden
Step 41
By default, Debian installs the Extended Support Release (ESR) version of Firefox. The ESR receives crash fixes, security fixes and policy updates as needed.
The flatpak, on the other hand, installs the Rapid Release version of Firefox. In contrast to the ESR, the Rapid Release receives major updates at least every four weeks. Both versions can be used concurrently. When installed on your desktop, they are listed as Firefox ESR and Firefox, respectively.
As an option, you may install Firefox Rapid Release and set it as the default browser.
A virtual disk image is a block device in a file. There are a number of different disk image formats to choose from when setting up a virtual machine. QEMU Copy On Write version 2 (QCOW2) is the default virtual disk image format for the Quick Emulator (QEMU). Features such as thin provisioning, snapshots and compression make QCOW2 one of the most versatile virtual disk formats available.
These instructions specifically target Debian 12 with a GNOME desktop as the host, but they should also be applicable to other Linux distributions such as Ubuntu or Linux Mint. The guest in this particular example is a Windows 11 virtual machine that has run out of space.
The partition /dev/sda3 listed in Step 8 is equivalent to /dev/nbd9p3 connected as a network block device. Use GNOME Disks to shrink /dev/nbd9p3 to its Minimal Size.
Use a graphical utility to minimise the risk of introducing errors.
Select the correct partition and from the pop-up menu, choose the option Resize…Select Minimal Size and resize the partition.
Step 12
Disconnect the resized image.
# qemu-nbd -d /dev/nbd9
Step 13
Unload the NBD kernel module.
# modprobe -r nbd
Step 14
Create a target image larger than the resized source image. In this example, the size of the target image is 128G and its format QCOW2 with full preallocation and a cluster size of 2M.
You can also modify format specific options for an existing image without having to create a target disk image. Or alternatively expand into a target image that uses a format compatible with other hypervisors, such as RAW, VMDK, VDI, VHD, VHDX or QED.
SSH is a protocol that enables secure connections over unsecured networks. It supports the use of asymmetric encryption for user authentication. Private keys are kept locally, while public keys are stored on the remote machine.
The following configuration disables root logins on the remote machine. Only users belonging to the group ssh-users may establish a connection. Access to the remote machine is tied to the local user’s private key.
In this example, the name of the remote machine is debian-server, which has the address 192.168.1.10 on the network. sid is a user on debian-server, whereas bookworm is a user on the local machine.
Choose an encryption passphrase to secure the private key that you will generate in Step 5.
On the remote machine
Step 1
Install the secure shell server with the following command:
$ sudo apt install --yes openssh-server
Step 2
If you are using ufw as a host-based firewall
Configure ufw to allow connections to the secure shell server.
When prompted to confirm the authenticity of the host debian-server, type yes and press [Enter].
The authenticity of host 'debian-server (192.168.1.10)' can't be established.
ED25519 key fingerprint is SHA256:C9RxLLVbvFwVJc0L4JHzcuHQSaPHJZe/GrRDvqy6rAG.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
In the next step, enter the passphrase for your private key.
Enter passphrase for key '/home/bookworm/.ssh/id_ed25519-debian-server':
Display the active configuration for the remote ssh server and verify its settings, paying particular attention to options for maxauthtries, permitrootlogin and passwordauthentication.
The usefulness of this project cannot be overstated.
Running the Syncthing stable channel
Syncthing is included in the Debian and Ubuntu repositories, respectively. These instructions are targeting the latest release of the Syncthing stable channel. It is therefore necessary to add the Syncthing repository to your list of APT sources.
In the following example, bookworm is the local username.
Step 1
Add the Syncthing release key for validation of packages downloaded from the Syncthing repository.
“Before we get started, let me say this upfront: GNOME shell is not a traditional desktop and if you try to use it as one, you will not be very efficient.”
“We wanted the book to be freely available (that is under the terms of a license compatible with the Debian Free Software Guidelines of course). There was a condition though: a liberation fund had to be completed to ensure we had a decent compensation for the work that the book represents. This fund reached its target of €25K in April 2012.” Raphaël Hertzog and Roland Mas hope that you will enjoy the book.