Saturday, November 23, 2024
Google search engine
HomeGuest BlogsTop Must-Do Things After Installing Debian 12 (Bookworm)

Top Must-Do Things After Installing Debian 12 (Bookworm)

.tdi_3.td-a-rec{text-align:center}.tdi_3 .td-element-style{z-index:-1}.tdi_3.td-a-rec-img{text-align:left}.tdi_3.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_3.td-a-rec-img{text-align:center}}

After more than a year of development, Debian 12 was finally realised on 10th June 2023. This new release was given the codename “Bookworm“. It has several new features and improvements, making it an appealing release for Debian users. One of the nifty and cool features is that it contains over 11200 new packages, bringing the total number of packages to over 59000! Also, over 9500+ packages have been removed in this update for being old and obsolete.

The other cool features of Debian 12 Bookworm are:

  • The Linux Kernel 6.1: Debian 12 uses the Linux Kernel 6.1. This is the latest LTS Linux kernel that has several features such as the enablement of Intel Meteor Lake, improved ARM SoC support, experimental support for Rust etc.
  • Pipewire by default for GNOME: Debian 12 now provides support for PipeWire, bringing it to par with other leading Linux distributions like Pop OS, Fedora and Ubuntu. This replaces the old PulseAudio, to handle audio and video.
  • Desktop environment improvements: ALl the major desktop environments are now updated to their latest releases apart from GNOME. The available versions of Debian 12 are GNOME 43, KDE Plasma 5.27, LXDE 11, LXQt 1.2, MATE 1.26 and Xfce 4.18
  • Default theme and wallpapers: Each Debian release comes with its own set of artwork from the community. Debian 12 is not different from them all, it uses a new artwork themed as Emerald.
  • Updated Software Suite: There are several other software that has been updated on Debian 12. These include LibreOffice 7.4, GIMP 2.10.34, Vim 9.0, Inkscape 1.2.2, Firefox 102.9 ESR, OpenJDK 11.6, PHP 8.2, Python 3.11+, Samba 4.17

After installing Debian12, there are a couple of activities you need to perform to bring the system to full functionality. In this guide, we will walk through the top Must-Do Things After Installing Debian 12 (Bookworm).

.tdi_2.td-a-rec{text-align:center}.tdi_2 .td-element-style{z-index:-1}.tdi_2.td-a-rec-img{text-align:left}.tdi_2.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_2.td-a-rec-img{text-align:center}}

1. Add User and Enable sudo Access

After installing Debian 12, you will realise that your user account does not have sudo access. This is mainly because Debian doesn’t provide the option of granting sudo access to user accounts during installation.

If you try to run any sudo command, you will see this:

Top Must Do Things After Installing Debian 12 Bookworm

Now to add a user and/or enable sudo access, you need to switch to the root user:

su -

You can add a user with the desired name if you do not have one created:

adduser <username>

Replace username with the desired name for the user and proceed as shown:

# adduser debian
Adding user `debian' ...
Adding new group `debian' (1001) ...
Adding new user `debian' (1001) with group `thor (1001)' ...
Creating home directory `/home/debian' ...
Copying files from `/etc/skel' ...
New password: Provide_password_here
Retype new password: Re-enter_the_password
passwd: password updated successfully
Changing the user information for debian
Enter the new value, or press ENTER for the default
	Full Name []: debian
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
Adding new user `debian' to supplemental / extra groups `users' ...
Adding user `debian' to group `users' ...

Here, there are two ways of enabling sudo for the user.

  • Method 1: The first one is editing the below file:
visudo

In this file, add the below line providing the exact name of your user account:

your-username   ALL=(ALL:ALL) ALL

After replacing your-username correctly, save the file and proceed to validate if access is granted.

  • Method 2: The other way to enable sudo is by adding the user to the sudo group
usermod -aG sudo your-username

Also here, replace your username in the above command. With any of the above methods used, validate if you have sudo access as shown:

Top Must Do Things After Installing Debian 12 Bookworm 1

2. Configure Networking

It is also important to ensure that you have internet access to your system before you proceed. Check the internet status or the assigned IP address on your system with the command:

ip a

Sample Output:

Top Must Do Things After Installing Debian 12 Bookworm 4

You can also view this on GUI under settings-> Network

Top Must Do Things After Installing Debian 12 Bookworm 5

By default, you will have DHCP configured. Some users prefer setting a static IP address. This is so easy on Debian 12. using Network Manager.

From the command line, launch the Network Manager CLI:

nmtui

Proceed and edit the network.

Top Must Do Things After Installing Debian 12 Bookworm 6

Select the connection to modify.

Top Must Do Things After Installing Debian 12 Bookworm 7

Now set the IP configuration to manual and provide your network config.

Top Must Do Things After Installing Debian 12 Bookworm 8

Save the changes then stop and start the network.

Top Must Do Things After Installing Debian 12 Bookworm 9

You can also set a static IP address on GUI under Settings-> Network and then proceed as shown:

Top Must Do Things After Installing Debian 12 Bookworm 11

Once the changes have been made, verify the IP address setting:

Top Must Do Things After Installing Debian 12 Bookworm 10

3. Configure Timezone / NTP Synchronization

It is important to ensure that the Time and Date settings are made correctly on your Debian 12 system after the installation. To check the date and time, you can use the commands below:

$ date
Thu Jun 22 03:32:42 EDT 2023

$ timedatectl status 
               Local time: Thu 2023-06-22 03:32:55 EDT
           Universal time: Thu 2023-06-22 07:32:55 UTC
                 RTC time: Thu 2023-06-22 07:32:55
                Time zone: US/Eastern (EDT, -0400)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

For this guide, we will use Chrony to set NTP synchronization. First install the package:

sudo apt install chrony

Once installed, start and enable the service;

sudo systemctl start chrony
sudo systemctl enable chrony

To view the available timezones, use:

$ timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
.....

Now set the timezone on your system.

sudo timedatectl set-timezone Africa/Nairobi --adjust-system-clock
sudo timedatectl set-ntp yes

Once the changes have been made, verify using the command:

$ timedatectl 
               Local time: Thu 2023-06-22 10:39:04 EAT
           Universal time: Thu 2023-06-22 07:39:04 UTC
                 RTC time: Thu 2023-06-22 07:39:04
                Time zone: Africa/Nairobi (EAT, +0300)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

4. Disable CD/DVD Package Repository

When running a system update, you will realise errors for the CDROM repositories because the cdrom repository does not have a release file.

To clear this error, we need to open the /etc/apt/sources.list file for editing. For this guide, I will use vim, ensure it is installed before you proceed:

sudo vim  /etc/apt/sources.list

In the file, comment out the CDROM repos:

Top Must Do Things After Installing Debian 12 Bookworm 2

Once the changes have been made, save the file and proceed as shown

5. Update Debian 12 (Bookworm) System

Now you can easily update the system and all the available packages to their latest available versions. Use the commands:

sudo apt update
sudo apt upgrade -y

Sample Output:

Top Must Do Things After Installing Debian 12 Bookworm 3

6. Install and Enable OpenSSH server

By default, OpenSSH is not enabled on Debian 12 after the installation. First, install OpenSSH with the command:

sudo apt install openssh-server openssh-client

Once installed, ensure that it is started and enabled:

sudo systemctl enable --now ssh

Verify if the service is running:

$ systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; preset: enabled)
     Active: active (running) since Fri 2023-06-16 05:49:41 EDT; 2min 46s ago
       Docs: man:sshd(8)
             man:sshd_config(5)
   Main PID: 3957 (sshd)
      Tasks: 1 (limit: 4623)
     Memory: 3.3M
        CPU: 63ms
     CGroup: /system.slice/ssh.service
             └─3957 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"

OpenSSH stores its configuration file at /etc/ssh/sshd_config. This file can be modified as desired to suit your preferences. Here, we will leave the default values and verify if we can access the system via SSH using the set IP address.

$ ssh [email protected]
The authenticity of host '192.168.200.56 (192.168.200.56)' can't be established.
ED25519 key fingerprint is SHA256:T6Dv/yw1jyUC5jo3tLoQ2yyU9f+dFudGahVL2bwmu24.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
[email protected]'s password: 

Once connected, you can proceed to other system administration tasks. If you do not want to use password authentication, generate the SSH keys on your workstation and copy them to the Debian 12 machine with the command:

##On your Local Machine
ssh-copy-id debian12-user@debian12-IP_address

For example:

Top Must Do Things After Installing Debian 12 Bookworm 12

Now verify if you are able to access the system without a password:

Top Must Do Things After Installing Debian 12 Bookworm 13

Now you can modify the OpenSSH config and disable password authentication via SSH:

$ sudo vim /etc/ssh/sshd_config
PasswordAuthentication no
PubkeyAuthentication yes

Once the changes have been made, restart the service:

sudo systemctl restart ssh

7. Enable UFW Firewall service

To improve the security of the system, you can enable the firewall. On this system, we will install UFW:

sudo apt install ufw -y

Once installed, enable it:

$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup

Now we can make basic settings for UFW. Deny all the incoming traffic apart from SSH, or any other service as desired:

sudo ufw default deny incoming
sudo ufw allow ssh

Allow all outgoing traffic:

sudo ufw default allow outgoing

8. Install and Customize Desktop Environments

By default, Debian 12 supports a number of desktop environments. To install a preferred Desktop environment, follow any of the below guides:

You can then tweak the Desktop environment as desired. For Gnome, the Gnome Tweak tool makes it easier to change themes, fonts and window behaviours on Debian 12. Launch it from the app menu as shown:

Top Must Do Things After Installing Debian 12 Bookworm 14

Once launched, you can make the desired adjustments to the system.

Top Must Do Things After Installing Debian 12 Bookworm 15

For my case, I want to add the minimize and maximize buttons to my windows. In the Windows title bars tab, enable the buttons.

Top Must Do Things After Installing Debian 12 Bookworm 16

Now you can also enable the dark mode on Debian 12 (Bookworm) as shown:

Top Must Do Things After Installing Debian 12 Bookworm 17

9. Enable Gnome Shell Extensions

To be able to install and manage the Gnome shell extensions, you need to install the below package:

 sudo apt install gnome-shell-extension-manager -y

Once the installation is complete, launch it from the App Menu.

Top Must Do Things After Installing Debian 12 Bookworm 18

Once launched, you can enable various extensions such as User Themes, Dash to dock

Top Must Do Things After Installing Debian 12 Bookworm 19

You can also manage the extension configurations here. Below is a screenshot with dash-to-dock enabled on Debian 12.

Top Must Do Things After Installing Debian 12 Bookworm 20

10. Enable Snapd on Debian 12 (Bookworm)

Snap is a modern package manager which makes it easier to install packages on any Linux system. It can be installed on Debian 12 with the command:

sudo apt install snapd

Once installed, ensure that it is started and enabled:

sudo systemctl enable --now snapd

Check the status of the service:

$ systemctl status snapd
● snapd.service - Snap Daemon
     Loaded: loaded (/lib/systemd/system/snapd.service; enabled; preset: enabled)
     Active: active (running) since Fri 2023-06-16 06:27:42 EDT; 4s ago
TriggeredBy: ● snapd.socket
   Main PID: 5040 (snapd)
      Tasks: 7 (limit: 4623)
     Memory: 9.5M
        CPU: 47ms
     CGroup: /system.slice/snapd.service
             └─5040 /usr/lib/snapd/snapd

Now you can proceed and install distribution-independent packages on Debian 12.

11. Install Google Chrome web browser

Google Chrome is now of the most popularly used browsers. By default, it is not installed on Debian 12 (Bookworm). There are several ways of installing Google Chrome. For this guide, we will use APT repos.

Begin by importing the GPG key:

wget https://dl-ssl.google.com/linux/linux_signing_key.pub -O /tmp/google.pub
sudo gpg --no-default-keyring --keyring /etc/apt/keyrings/google-chrome.gpg --import /tmp/google.pub

Add the repositories:

echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list

Update the system and install Google Chrome:

sudo apt update
sudo apt install google-chrome-stable

Once complete, launch it from the App Menu:

Top Must Do Things After Installing Debian 12 Bookworm 21

Proceed and enjoy.

Top Must Do Things After Installing Debian 12 Bookworm 22

Verdict

That marks the end of this detailed guide on top Must-Do Things After Installing Debian 12 (Bookworm). I hope this guide was of importance to you.

Interested in more:

.tdi_4.td-a-rec{text-align:center}.tdi_4 .td-element-style{z-index:-1}.tdi_4.td-a-rec-img{text-align:left}.tdi_4.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_4.td-a-rec-img{text-align:center}}

RELATED ARTICLES

Most Popular

Recent Comments