by Marcus Zou | 25 Jan 2025

1A) In case of no users created

## Setup the password for root user
passwd root

## temporarily Add `/usr/sbin` into your PATH
echo PATH="$PATH:/usr/sbin"

## permanently Add `/usr/sbin` into your PATH
nano ~/.bashrc
## Then add the following into the file
export PATH="/usr/sbin:$PATH"

## Create a new user: zenusr and set the password
adduser zenusr

## When a new user is created, they are assigned to a primary group that takes after the user account’s name. In this case, the user zenusr belongs to the primary group called zenusr. To confirm this, run the command as follows:
groups zenusr
#### zenusr : zenusr users

## In case of no wheel group
addgroup wheel
## Next, run the following usermod command to add the user to wheel, sudoers group:
usermod -aG wheel zenusr
usermod -aG sudo zenusr

## The following steps are NEEDED even though the zenusr has joined the sudo group prior
## Edit the /etc/sudoers file to ensure zenusr is in the business
nano /etc/sudoers
   ## Add the new line: 
   zenusr ALL=(ALL:ALL) ALL

## Now test the priviledge of zenusr
su - zenusr
sudo apt update
sudo apt upgrade -y

1B) Time Changes when dual booting between Linux and Windows

Your time changes when dual-booting because Windows assumes the hardware clock is in local time, while Linux assumes it's in Coordinated Universal Time (UTC). When you switch operating systems, the other OS reads the time incorrectly from the hardware clock, causing a discrepancy that you see as a time change. The fix is to either tell Linux to use local time or to tell Windows to use UTC.

This is generally the easier method and is recommended for most users.

  1. Open a terminal in Linux.

Verify the change by running timedatectl. The output should say "RTC in local TZ: yes".

timedatectl

Run the following command to set the hardware clock to local time:

timedatectl set-local-rtc 1 --adjust-system-clock
## Set hardware clock to RTC:
## timedatectl set-local-rtc 0

Fix by changing Windows to use UTC

This method makes Windows conform to the international standard that Linux uses by default.

  1. Open Command Prompt as an administrator. Search for "cmd" in the Start Menu, right-click, and select "Run as administrator".
  2. Restart your computer for the change to take effect.

Run the following command to modify the Windows registry:

reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1 /f

1C) Setup NTP Server on Debian

To set up an NTP server on Debian, Please follow teh steps below:

Step 1: Install the NTP package

Update your package list and install the NTP server package by running the following commands:

sudo apt update
sudo apt install ntp

(This installs the ntp package, which includes the ntpd daemon).

Step 2: Configure the NTP server

Find the lines that specify server pools or individual servers and replace them with your desired NTP server addresses. For example, you can add a pool of servers from a specific region:

pool 0.debian.pool.ntp.org iburst
pool 1.debian.pool.ntp.org iburst
pool 2.debian.pool.ntp.org iburst
pool 3.debian.pool.ntp.org iburst

Open the configuration file with a text editor:

sudo nano /etc/ntp.conf

Step 3: Restart and verify the service

To see which NTP servers your server is syncing with, run:

ntpq -p

(The output will show the status of the synchronization.

Check the status of the service and confirm it is running:

systemctl status ntp

Restart the NTP service for the new configuration to take effect:

sudo systemctl restart ntp

1D) In case of Installing Debian 12 via DVD-ROM / ISO File

If you install Debian 12.12 with DVD-ROM/ISO, then please update the /etc/apt/source.list, because the source list has a single source of DVD-ROM only, as such you will not able to update or install any packages if the DVD-ROM is detached.

sudo nano /etc/apt/source.list

Make sure to comment out the cdrom line and add other lines for a better list of source, I put Germany and Greece sites first since I'm physically located in North Africa.

# /etc/apt/sources.list
#deb cdrom:[Official Debian GNU/Linux Live 12.12.0 gnome 2025-09-06T11:02:45Z]/ bookworm main non-free-firmware
## Germany
deb http://ftp2.de.debian.org/debian bookworm main contrib non-free-firmware
deb-src http://ftp2.de.debian.org/debian bookworm main contrib non-free-firmware
deb http://ftp2.de.debian.org/debian bookworm-updates main contrib non-free-firmware
deb-src http://ftp2.de.debian.org/debian bookworm-updates main contrib non-free-firmware
## Greece
deb http://debian.otenet.gr/debian bookworm main contrib non-free-firmware
deb-src http://debian.otenet.gr/debian bookworm main contrib non-free-firmware
deb http://debian.otenet.gr/debian bookworm-updates main contrib non-free-firmware
deb-src http://debian.otenet.gr/debian bookworm-updates main contrib non-free-firmware
## Official
deb http://deb.debian.org/debian bookworm main contrib non-free-firmware
deb-src http://deb.debian.org/debian bookworm main contrib non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free-firmware

1E) In case of VM Guest: Drive the Video Card with open-vm-tools

Install critical driver package for VM Guest

sudo apt install open-vm-tools open-vm-tools-desktop
sudo reboot

Sometimes, the open-vm-tools does not work after a reboot, typically:

  • the screen is not full-screen or
  • the shared folder does not get mounted

Then the correct way to drive them up is as follows:

# STEP 1: Purge the installation
sudo apt remove open-vm-tools --purge

# STEP 2: Install open-vm-tools ONLY
sudo apt install open-vm-tools

# STEP 3: Install open-vm-desktop ONLY
sudo apt install open-vm-tools-desktop

# STEP 4: Reboot or Shutdown the VM
sudo reboot

# STEP 5: Start up the VM, then you shall be in good shape.

1F) In case of VM Guest: Shared folder with Host

Create a shared folder if you don't have such:

sudo mkdir -p /mnt/hgfs

Open /etc/fstab by:

sudo nano /etc/fstab

Add the below into the last row of the file

vmhgfs-fuse   /mnt/hgfs    fuse    defaults,allow_other,_netdev    0    0

and then reboot.

2A) Basic Installation

# check the version of Debian
cat /etc/os-release

# check the IP address
ip a

# update and upgrade
sudo apt update && sudo apt upgrade -y

# Install common tools - Do Not install NodeJS/npm here as it's very low version.
sudo apt install nano wget tar rsync ntfs-3g unzip zip -y
sudo apt install curl git exfat-fuse gh htop net-tools tree -y

# The Debian installer uses the ifupdown package for network management, but GNOME uses NetworkManager. To avoid conflicts and ensure your WiFi card works, remove ifupdown:
sudo apt purge ifupdown -y
sudo apt install bridge-utils network-manager -y

# Optionally install - All aer big-sized, install as needed
sudo apt install ffmpeg mpv -y
# sudo apt install cups-pdf ## PDF Server

## Install fastfetch instead, because no one maintains neofetch now.
wget https://github.com/fastfetch-cli/fastfetch/releases/download/2.54.0/fastfetch-linux-amd64.deb
sudo dpkg -i fastfetch-linux-amd64.deb
rm fastfetch-linux-amd64.deb

# Python3 version: 
python3 --version
## Debian 12.12 - Python3.11.2

# Python3 related apps: pip, venv
sudo apt install python-is-python3 python3-pip python3.11-venv -y

## Instll uv - the package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env

2B) Classic Apps of Debian Desktop for Beginners

## 1- LibreOffice - Office Suite
sudo apt install libreoffice -y
## 2- GIMP - a Photo Editor
sudo apt install gimp -y
## 3- VLC Player - a Video Player and audio player
sudo apt install vlc elisa -y
## 4- Shotcut - A simple Video Editor
sudo apt install shotcut -y
## 5- Slack - Team Collaboration
sudo apt install slack -y
## 6- KeePassXC - Password Manager
sudo apt install keepassxc -y
## 7- Sayonara
sudo apt install sayonara -y
## 8- Stacer - System Optimizer and Monitor
sudo apt install stacer -y
## 9- Wine - A Windows App Runner
## 10- Gnome Tweaks

3A) Change Hostname in a physical/virtual box

Change hostname (but it will reverse if no reboot), as such /etc/hostname file will changed.

sudo hostnamectl set-hostname zendebbie12
# sudo nano /etc/hostname

Then change /etc/hosts and reboot/shutdown.

sudo nano /etc/hosts
sudo shutdown -h now

3B) Change Hostname in WSL2 Debian 12

The way to Change the instance name permanently is different from the one in a real Linux. Here is the how-to.

1- Open /etc/wsl.conf or create the same if it doesn't exist, using the nano text editor.

sudo nano /etc/wsl.conf

Update the content as below:

[boot]
systemd=true

[network]
hostname=debian12wsl
generateHosts=false
generateResolvConf=false

[user]
default=zenusr

2- Edit /etc/hosts file ensuring it matches the wsl.conf-assigned hostname:

# The following lines are desirable for IPv4 capable hosts
127.0.0.1       localhost
127.0.1.1       Debian22wsl.localdomain debian12wsl

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

3- If setting "generateResolvConf=false" in Step 1 above, you need to create/update the file /etc/resolv.conf specify nameserver manually.

#/etc/resolv.conf
nameserver 8.8.8.8
nameserver 1.1.1.1

4- Shutdown the WSL2 distro using wsl -t Debian22wsl and re-launch it.

3C) Change Hostname in WSL2 Debian 12

The way to change the hostname is same as in Debian 12, but the name-resolving differs.

Normally You may have big issue of unable to access internet due to the nameserver issue if you follow the steps in Section 3C. Actually since Debian 12, the name resolving question is addressed by systemd-resolved, not the systemd. that's why the setting of generateResolvConf=false in /etc/wsl.conf has no effect to the nameserver.

1- Open /etc/wsl.conf or create the same if it doesn't exist, using the nano text editor.

sudo nano /etc/wsl.conf

Update the content as below:

[boot]
systemd=true

[network]
hostname=debian12wsl
generateHosts=false
generateResolvConf=false

[user]
default=zenusr

2- Edit /etc/hosts file ensuring it matches the wsl.conf-assigned hostname:

# The following lines are desirable for IPv4 capable hosts
127.0.0.1       localhost
127.0.1.1       Debian22wsl.localdomain Debian22wsl

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

3- Remove the /etc/resolv.conf, which is actually a symbolic link to /run/systemd/resolve/stub-resolv.conf:

sudo rm /etc/resolv.conf

4- Create a new file /etc/resolv.conf.

sudo nano /etc/resolv.conf

with content as below:

#/etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 1.1.1.1
nameserver 9.9.9.9

5- Restart the service and test it out.

sudo systemctl restart systemd-resolved.service

Alternatively if you prefer to keep If you prefer to keep systemd-resolved active but use specific DNS servers, you can configure them within systemd-resolved itself. This approach maintains the 127.0.0.53 local stub listener, leveraging its caching features.

Save the changes and restart the systemd-resolved service:

sudo systemctl restart systemd-resolved.service

Uncomment the [Resolve] section and specify your DNS servers. You can also specify fallback servers:

[Resolve]
# Primary DNS server, e.g. Cloudflare DNS
DNS=1.1.1.1 
# Fallback DNS server, e.g., Google
FallbackDNS=8.8.8.8 
# Other options can be uncommented as needed
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes

Edit the resolved.conf configuration file:

sudo nano /etc/systemd/resolved.conf

4) Configure a Static IP address with NetworkManager

By default, Debian system presents a dynamic IP address, so please run command to get known the network card name, which is either eth0 or ens33. Mine is ens33.

ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:3d:0b:80 brd ff:ff:ff:ff:ff:ff
inet 192.168.30.149/24 metric 100 brd 192.168.30.255 scope global dynamic ens33
valid_lft 1699sec preferred_lft 1699sec
inet6 fe80::20c:29ff:fe3d:b80/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever

Also look at the IP/subnet mask: it's showing:192.168.30.149/24. I am going to set the static IP as192.168.30.200/24though. Launch the nano editor:

sudo nano /etc/netplan/01-network-manager-all.yaml

edit the contents to be same or similar as below:

network:
 version: 2
 renderer: NetworkManager
 ethernets:
   eth0:
     dhcp4: no
     addresses: [192.168.30.200/24]
     routes:
       - to: default
         via: 192.168.30.2
     nameservers:
       addresses: [8.8.8.8,8.8.4.4,1.1.1.1]

Most likely an error of the following will pops up.

Permissions for /etc/netplan/01-network-manager-all.yaml are too open

That's because this file is created/edited by sudo user, then it can be read by the 'sudo' user and 'other' user (look at the second and third r in the output below, check file attributes and security on Internet).

sudo ls /etc/netplan/01-network-manager-all.yaml -la
## -rw-r--r-- 1 root root 243 Feb  7 09:38 /etc/netplan/01-network-manager-all.yaml

To fix this "permission too open" issue, run command below:

sudo chmod 600 /etc/netplan/01-network-manager-all.yaml

sudo ls -la /etc/netplan/01-network-manager-all.yaml
## -rw------- 1 root root 243 Feb  7 09:38 /etc/netplan/01-network-manager-all.yaml

Then, apply the changes:

sudo netplan apply

If your Debian or Rocky Linux does not come with the Network-Manager service (most likely it's true), then install it and activate it:

sudo apt install network-manager

sudo systemctl enable NetworkManager
sudo systemctl start NetworkManager
sudo systemctl status NetworkManager

Eventually, apply the changes:

sudo netplan apply
sudo systemctl restart NetworkManager

Then you should have a static IP address by now.

ip a

You should see a different IP address specified in the Network-Manager configuration yaml file. Hola!

5) Install SSH

# install Open-SSH Server, client and dependencies in one shot
sudo apt install ssh -y

# Then start the service and check out the results
sudo systemctl enable ssh
sudo systemctl start ssh
systemctl status ssh

Then SSH'ing to the Linux Box if it's a case of VM.

6) Install NodeJS 20.x/22.x/24.x

With the system and the necessarily dependencies ready to go, we can grab the setup script for Node.js 22/24 and give it a spin. This script will add the new apt sources and runs another apt update to get us ready to install nodejs. Then install nodejs:

sudo apt update
## Install v24.10.0 for Debian 12
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install nodejs -y
## Install v22.10.0 for Debian 12
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install nodejs -y

With nodejs installed, you can check to see that everything worked out as we would have expected, but running the node command with the --version argument:

node -v
## v22.21.1 or v24.11.1

Also install the latest npm v10.8.2 since the associated npm version of the node 20.18.2.

npm -v

## Output be like:
## 10.9.2 or 11.6.0
## if not, please install npm manually:
## sudo npm install -g [email protected]
## or the leatest
## sudo npm install -g npm@latest

Optionally install the yarn tool for future dev.

sudo npm install --global yarn
yarn --version
## 1.22.22

7) Java JDK-21

Quite some enterprise applications need a JRE or JDK to run, then we need to install such.

Version wise, I prefer Oracle based JDK, that's genuine!

## Install
sudo apt update
wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb
sudo dpkg -i jdk-21_linux-x64_bin.deb
## Verify
java --version
## Remove
rm jdk-21_linux-x64_bin.deb

8A) Docker Container: Install Docker Engine only

Docker Desktop is too heavy and resource-thirsty, then a better option for WSL Linux distro is to install the Docker Engine only.

Docker Engine for Debian is compatible with x86_64 (or amd64), armhf, arm64, s390x, and ppc64le (ppc64el) architectures.

(1) Uninstall old versions

Before you can install Docker Engine, you need to uninstall any conflicting packages.

Your Linux distribution may provide unofficial Docker packages, which may conflict with the official packages provided by Docker. You must uninstall these packages before you install the official version of Docker Engine.

The unofficial packages to uninstall are:

  • docker.io
  • docker-compose
  • docker-compose-v2
  • docker-doc
  • podman-docker

Moreover, Docker Engine depends on containerd and runc. Docker Engine bundles these dependencies as one bundle: containerd.io. If you have installed the containerd or runc previously, uninstall them to avoid conflicts with the versions bundled with Docker Engine.

Run the following command to uninstall all conflicting packages:

for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done

apt-get might report that you have none of these packages installed.

Images, containers, volumes, and networks stored in /var/lib/docker/ aren't automatically removed when you uninstall Docker. If you want to start with a clean installation, and prefer to clean up any existing data, read the 3. Uninstall Docker Engine section.

(2) Install using the apt repository

Before you install Docker Engine for the first time on a new host machine, you need to set up the Docker apt repository. Afterward, you can install and update Docker from the repository.

Optionally remove the hello-world container:

docker ps -a
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)

docker images
docker image rm $(docker images -aq)

Verify that the installation is successful by running the hello-world image without sudo.

docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.

Add your user to the docker group.

sudo usermod -aG docker $USER

Use the id command to confirm if the docker group has associated to $USER:

id

Log out of the WSL2 distro or reboot the Linux system:

exit

And log back in so that your group membership is re-evaluated.Then use the id command to confirm if the docker group has associated to $USER

id

You can also run the following command to activate the changes to groups:

newgrp docker

Install the Five Docker packages (ce, cli, containerd, buildx plugin and docker-compose plugin):

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y

Set up Docker's apt repository.

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "${Debian_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

You have now successfully installed and started Docker Engine.

(3) Uninstall Docker Engine

Remove source list and keyrings

sudo rm /etc/apt/sources.list.d/docker.list
sudo rm /etc/apt/keyrings/docker.asc

Images, containers, volumes, or custom configuration files on your host aren't automatically removed. To delete all images, containers, and volumes:

sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd

Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:

sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras

You have to delete any edited configuration files manually.

8B) Podman Container: Install Podman Engine only

Podman is an open-source, daemon-less container management tool that lets you develop, manage, and run Open Container Initiative (OCI) containers without a background daemon process. Podman enhances the security of containerized applications and reduces resource usage due to its daemon-less design.

Podman is available in the default package repositories on Debian 24.xx. Follow the steps below to install Podman using the APT package manager on your server.

View the installed Podman version on your server.

podman -v
## sudo podman version  ## More information

Install Podman.

sudo apt install podman -y
sudo apt install podman-compose -y

Update the server's package index.

sudo apt update

​ Podman uses two system services for managing containers, podman CLI and podman.socket.

podman is the command-line interface that enables direct interaction with Podman, enabling users to manage resources such as containers, images, and pods.

podman.socket is a systemd socket file that provides remote API access to Podman, which is useful for remote management and integration with container development tools. You can use podman.socket to run Podman as a system service. Follow the steps below to manage the Podman system service and enable the application to run on your server.

  1. Run Podman in rootless mode: Podman offers several advantages, including the ability to run containers in rootless mode. This allows regular users to deploy containers without elevated privileges. In other words, rootless mode means that you can deploy a container without becoming root or using sudo.

Set Podman registries conf: If there is no repository to fetch and install container Images by Podman, then we need to add that manually. We can use popular repositories such as Docker.io, Redhat, and Fedora. Modify the Registry configuration file by executing the following command:

sudo nano /etc/containers/registries.conf

The contents be like:

[registries.search]
registries=["quay.io", "docker.io", "registry.access.redhat.com", "registry.fedoraproject.org"]

Start the Podman service and check the status.

sudo systemctl start podman.socket
sudo systemctl status podman.socket

In case you nee to stop the Podman service.

sudo systemctl stop podman.socket

Restart the Podman service.

sudo systemctl restart podman.socket

Enable the Podman service to automatically start at system boot.

sudo systemctl enable podman.socket

By default, Podman launches containers with root user by affixing sudo into a command. Running podman in rootless mode can be achieved by following steps:

id
## uid=1000(zenusr) ...,4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),101(lxd)

sudo groupadd podman
sudo usermod -aG podman $USER
id
exit

Log out and log back in.

id
## uid=1000(zenusr) ...,4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),101(lxd),1001(podman)

Uninstall Podman

sudo apt remove podman podman-conpose -y

Test and Clean Out

## Pull images from docker.io
podman pull docker.io/nginx:alpine
podman images
## Then, launch and run the container:
podman run -d --name nginx-server -p 9090:80 docker.io/nginx:alpine

## Clean out the testing container and image:
podman ps -a
podman stop $(podman ps -q)
podman container rm $(podman ps -aq)

podman images
podman image rm $(podman images -q)

9A) Debian Server Only: Install Cockpit

Cockpit is available in Debian, with updated versions in official backports for LTS releases.

We recommend installing or updating the latest version from backports. This repository is enabled by default, but if you customized apt sources you might need to enable them manually.

. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit

When updating Cockpit-related packages and any dependencies, make sure to use -t ...-backports as above, so backports are included.

Then ensure the cockpit service is running up:

sudo systemctl enable cockpit.socket
sudo systemctl start cockpit.socket
sudo systemctl status cockpit.socket

Optionally install cockpit-podman app:

sudo apt install cockpit-podman

Finally, access the Server with http://ip-address:9090.

9B) Debian Server Only: Install webmin

To install Webmin on Debian 24.10, follow these easy steps.

Step 1 : Update System Packages

sudo apt update

Step 2 : Download the webmin-setup-repos.sh script

curl -o webmin-setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/webmin-setup-repos.sh

Step 3 : Run the setup script to configure the Webmin repository

sudo sh webmin-setup-repos.sh

Step 4 : Install Webmin as per what the system prompts after the repository is configured

sudo apt-get install --install-recommends webmin usermin

Step 5 : Access Webmin by opening a web browser and navigating to

https://<your-server-ip>:10000

Congratulations! You've successfully installed Webmin on your Debian 24.10 server.

How to Uninstall webmin:

## – Stop the Webmin service
sudo service webmin stop
##  – Uninstall Webmin and its configuration files
sudo apt-get purge webmin
##  – Remove the Webmin directory
sudo rm -rf /etc/webmin
##  – Update the package database
sudo apt-get update

9C) Debian Server Only: Install 1Panel

To install 1Panel on Debian 24.10, follow these easy steps.

## Switch to su user
su -
## One command for all
curl -sSL https://resource.1panel.pro/quick_start.sh -o quick_start.sh && bash quick_start.sh

10A) Debian Server Only: Install X11 Server (Optional)

You are not supposed to install any GUI on a Debian Linux server since a GUI installing jeopardizes the server and remoting into a server is correct approach for DevOps. But for some reasons, a GUI may be needed, for instance, running a GUI based app on the server, say gparted. as such, a minimum X11 server might be installed as below:

sudo apt update
## Install X11 Server
sudo apt install xauth
sudo apt install xorg

## install graphic apps
sudo apt install gparted

## Enter into X Window
startx

## From the very simple window, you can run:
sudo gparted

10B) Debian 12 or WSL only: Install Light-weight GUI

1- Update your system

sudo apt update && sudo apt upgrade -y

2- Install the Desktop environment

## The default Debian Desktop experience: GNOME 
sudo apt install gnome-core gnome gnome-tweaks gnome-shell-extensions -y
## or Minimal GNOME
sudo apt install gnome-core -y
sudo apt purge ifupdown -y
## Or the lightweight option: Xfce (The best)
sudo apt install xfce4 xfce4-goodies xfce4-dev-tools -y
## Or another lightweight option: LXDE
sudo apt install lxde lxqt lxde-common lxde-icon-theme -y
## Or the typical balanced option: KDE Plasma
sudo apt install Debian-plasma-desktop kde-full -y

3- Install a display manager

## For GNOME:
sudo apt install gdm3 -y
## For lightweight Xfce or LXDE:
sudo apt install lightdm -y

4- Enable GUI to start automatically

## Check the default target
systemctl get-default
## Switch to the graphical mode
sudo systemctl set-default graphical.target

5- Setting Default Environment

# Create .xsession file
echo "exec startxfce4" > ~/.xsession

# Or use .xinitrc
echo "exec gnome-session" > ~/.xinitrc

# Make executable
chmod +x ~/.xsession

6- Reboot the system

sudo reboot

7- (Optional) Install VNC/xrdp for remote desktop connections

## Install VNC Server - tightvncserver
sudo apt install tightvncserver -y
## Install RDP Server - xrdp
sudo apt install xrdp -y

8- (Optional) Manage the GUI

## return to the non-graphysical environment
sudo systenctl set-defaut multi-user.target

In order to share projects between the Host (Windows 11/10) and the WSL (Debian or Debian), it's advised to create a soft link to a specific projects folder as below:

ln -s /mnt/c/Users/myUserID/Desktop/projects/ projects

ls -la

then you can enter into the projects folder for developing apps and the files can be accessed from Windows as well.

cd projects
mkdir myApp
cd myApp

code .

As such to install the VS Code Server in WSL2 but connecting to the Host of Windows 11/10. Obviously you should have installed VS Code on the Windows Host already.

12A) Install JetBrains IntelliJ IDEA, PyCharm, CLion, etc.

Install them from the "App Center", or install them through the official website of JetBrains:

1- CLion

## Download the installer and extract it
wget https://download-cdn.jetbrains.com/cpp/CLion-2025.2.tar.gz
sudo tar -xvzf CLion-2025.2.tar.gz -C /opt/

## Configure the binary file in /opt/clion-2025.2 folder
echo 'PATH="/opt/clion-2025.2/bin:$PATH"' >> ~/.profile
source ~/.profile

## Run the app
clion

2- PyCharm

## merged Professional and Community editions as of May 2025
## version = 2025.2 as of August 14, 2025

## Download the installer and extract it
wget https://download-cdn.jetbrains.com/python/pycharm-2025.2.0.1.tar.gz
sudo tar -xvzf pycharm-2025.2.0.1.tar.gz -C /opt/

## Rename the installation folder
sudo mv /opt/pycharm-2025.2.0.1 /opt/pycharm-2025.2

## Configure the binary file in /opt/pycharm-2025.2 folder
echo 'PATH="/opt/pycharm-2025.2/bin:$PATH"' >> ~/.profile
source ~/.profile

## Run the app
pycharm

3- IntelliJ ideaIU

## Download the installer and extract it
wget https://download-cdn.jetbrains.com/idea/ideaIU-2025.2.tar.gz
sudo tar -xvzf ideaIU-2025.2.tar.gz -C /opt/

## Rename the installation folder
sudo mv /opt/idea-IU-252.23892.409/ /opt/ideaIU-2025.2/

## Configure the binary file in /opt/ideaIU-2025.2 folder
echo 'PATH="/opt/ideaIU-2025.2/bin:$PATH"' >> ~/.profile
source ~/.profile

## Run the app
idea

4- GoLand

## Download the installer and extract it
wget https://download-cdn.jetbrains.com/go/goland-2025.2.tar.gz
sudo tar -xvzf goland-2025.2.tar.gz -C /opt/

## Configure the binary file in /opt/GoLand-2025.2 folder
echo 'PATH="/opt/GoLand-2025.2/bin:$PATH"' >> ~/.profile
source ~/.profile

## Run the app
goland

12B) Activate JetBrains (Valid for 2025.x till Sept 2026)

1- Please always download the LATEST jetbra-all.zip

## Download the latest jetbra-all.zip
## (as of August 2025, the very website was taken down due to DMCA)
## wget https://github.com/novitechie/jetbra/releases/download/Jetbra/jetbra-all.zip

## Then Download from a local copy:
cp /mnt/h/WACKIE/apps/Coding/JetBrains-Products/patcher-4-all/jetbra-ActCode-from-https-3.jetbra.in_Half-Auto-Licensed-to-Sept-2026.zip jetbra-all.zip
## sudo apt install unzip
unzip jetbra-all.zip

2- Enter the folder and run the script.

cd jetbra
sudo chmod 755 ./script/install.sh
./script/install.sh

## ensure a message is up saying:
## done. you'd better log off first!

## exit WSL2 distro and log back later
exit

3- Log off and log back in the WSL2 again, and launch any JetBrains app, say clion:

## /opt/clion-2025.2/bin/clion
clion

4- Browse to an Indian website: https://jetbra.in/5d84466e31722979266057664941a71893322460 (Salute Indian geeks) and click the "************" part under "CLion" to copy the Activation code.

5A- If you have not opened any project, return to the app and click the gear icon at lower-left corner -> click "Manage Licenses" --> "Activate Another Subscription", Toggle the "Activation code" radio-button, then paste the Activation code (acquired previously) into the text box.

5B- If you have already opened a project, then click "Help" menu -> "Register", then click "Activate Another License" -> "Paid license" -> then paste the Activation code into the text box.

6- Click "Activate" button, then you shall see "Licensed to John Doe, Valid through 9/14/26". Done!

7- Also go to "Manage Licenses" to activate "Code with Me" plugin.

8- For other product, the activation method is same as the steps above.

12C) Activate JetBrains (Valid for 2025.x till Oct 2048)

1- Please always download the LATEST jetbra-all.zip

## Copy from a local copy:
cp /mnt/h/WACKIE/apps/Coding/JetBrains-Products/patcher-4-all/ja-netfilter-all-2024-01-11-auto-licensed-to-oct-2048.zip a-netfiler-all.zip

## sudo apt install unzip  ## if needed
unzip a-netfiler-all.zip -d .

2- Enter the folder and run the script.

cd ja-netfilter-all

chmod 755 ./script/install.sh
./script/install.sh

## ensure a message is up saying:
## done. you'd better log off first!

## exit WSL2 distro and log back later
exit

3- Log off and log back in the WSL2 again, and launch any JetBrains app, say clion:

## /opt/clion-2025.2/bin/clion
clion

## You shall see a message of "sniarbtej YYDS 2024.1.11"

4- Click "Manage Licenses" button, then you shall see "Licensed to JetBrains YYDS, Valid through 10/24/48". Hola!

5- Also the "Code with Me" plugin is licensed.

6- For other product, the activation method is same as the steps above.

13) Install snap apps as needed

snapd is a great package manager option for installing extra apps into Debian Linux.

# Install snapd, a great repo for installing extra  apps into Debian Linux.
sudo apt install snapd -y
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

## Install some common apps
sudo snap install insomnia whatsapp-electron
## More to install (Optionally)
sudo snap install discord postman
## Android Studio
sudo snap install android-studio --classic
## VS Code
sudo snap install code --classic

## Uninstall snap apps
sudo snap remove discord

14) Extra: Install OnlyOffice Desktop Editors suite

Now the editors can be easily installed using the snap repository:

sudo snap install onlyoffice-desktopeditors

Run ONLYOFFICE Desktop Editors using the terminal command: desktopeditors or through your computer's Application menu.

15) Extra: Install WPS Office suite

WPS Office Suite is preferred, functionality wise.

# This is version 10.0.1 Stable verstion
sudo snap install wps-office-multilang

# Remove
sudo snap remove wps-office-multilang

Or you can download the .deb file from https://www.wps.com website and install the latest version with more fancy functions but less stable.

# download and install
wget https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/11723/wps-office_11.1.0.11723.XA_amd64.deb
sudo dpkg -i wps-office_11.1.0.11723.XA_amd64.deb

# install missing WPS-related fonts
git clone https://github.com/iamdh4/ttf-wps-fonts.git
cd ttf-wps-fonts
sudo bash install.sh
cd ..
rm -rf ttf-wps-fonts

# Remove
sudo dpkg -r wps-office

17) Extra: Install Google Chrome browser

## Install
sudo apt update
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
## Remove the installer file
rm google-chrome-stable_current_amd64.deb

# Uninstall
sudo dpkg -r google-chrome-stable

18) Extra: Remove LibreOffice, KDE apps and Games

sudo apt remove --purge libreoffice\* -y
sudo apt remove --purge kde* -y
sudo apt remove --purge gnome-games* -y
sudo apt autoremove -y

19) Extra: WSL2 distro Backup and Restore

Once you have installed and configured all of the apps in WSL2 distro, you may need to backup and the restore it once it gets messed up.

1- Backup

## Check up the status of the distros
wsl -l -v

## shutdown the specific distro, say Debian.
wsl -t Debian-24.04

## then back it up
## The general syntax is:
## wsl --export <distribution_name> <filename.tar.gz>
wsl --export Debian-24.04 "E:\wackie\__wsl-repo__\Debian-2404.tar.gz"

2- Restore

## The general syntax is:
## wsl --import <Distribution Name> <InstallLocation> <FileName>
wsl --import Debian24 "E:\vmbox\wsl-arena\Debian24" "E:\vmbox\__wsl-repo__\Debian-2404.tar.gz"

Once imported, the datafile is in vhdx format.

Once imported, the default user is root, while the previously created user is still in the folder /home/zenusr. Then we need to set the default user as per Microsoft: https://docs.microsoft.com/en-us/windows/wsl/wsl-config#user-settings

## Create a `/etc/wsl.conf` in the instance with the following settings:
[user]
default=zenusr

End