Tag Archives: Linux How to

Unix Similar multi-user operating systems based on the Linux kernel and essentially on GNU software. Like CentOS, Debian, Ubuntu Fedora.

Enable systemd on Debian 11 in WSL 2

Enable systemd on Debian 11 in WSL 2 to run as default Init-System. This guide will show how to enable systemd using services like mariadb and apache2 or docker and many others to work during a WSL session. This was tested on Windows 11 Build 22621, running Debian GNU/Linux 11 (bullseye) in WSL 2.

What is systemd?

systemd is a collection of programs, daemons, and libraries for Linux operating systems. Its central part is the systemd init process, which serves as the first process for starting, monitoring and terminating other processes.

Enable systemd on Debian in WSL 2

$ sudo vi /etc/wsl.conf

quote you can of course choose your favorite editor, for example instead of vi maybe nano is your editor of choice.

Edit the content below in the wsl.conf file.

[boot]
systemd=true

Next reboot the Debian in WSL session.

$ sudo reboot

you can also run the following command to terminate the Debian in the windows command prompt or in the powsershell.

C:\> wsl -t debian

where debian is the name of the wsl instance, replace it with your name.

to launch the debian use systemd in WSL ran the following command.

C:\> wsl.exe ~ -d Debian

the current status of wsl can be checked as follows.

C:\> wsl -l -v

the meaning of the parapeters are:
-l = Lists distributions
-v = Displays detailed information about all distributions

Now let’s see the status with show runtime status of units.

$ sudo systemctl status

Conclusion

In this guide, I’ll show you how to easily enable systemd on Debian to run as the default Init-System on WSL 2. This allows services like docker and apache2 or mariadb and many others to run during a WSL session. This was tested on Windows 11 Build 22621 running Debian GNU/Linux 11 (Bullseye) in WSL 2.

quote I found out that when Ubuntu is deployed in WSL 2, systemd is automatically enabled as the default init system. This allows like mariadb or docker and others services running in the Ubuntu WSL session.

a few more thoughts on systemd

The main criticism of systemd is its versatility. It violates the Unix philosophy of doing only one task, but doing it as well as possible. Systemd is also overly complex and error-prone. It is also criticized for having Google’s DNS and NTP server hard-coded as a fallback.

Debian systemd in WSL

The first processes start when booting, and Systemd already has a finger in the pie here in several ways. On the one hand, by controlling and organizing the entire boot process, on the other hand, by providing information later on how the started processes are doing.

systemd or System-V-Init

You have to decide for yourself whether you want to use systemd or the previous System-V-Init-Systems, but it’s useful to be able to choose one or the other and change it again at any time.

quote You might also be interested in these related post here.

Chromium and Chrome does not show text properly

The Chromium or Chrome browser does not show text websites properly and images appers confused after update Ubuntu 22, Linux Mint 21.

In this tutorial we will show how to fix Chrome and Chromium browser they not show text websites properly. This problem can appear after updating Linux Mint and Ubuntu. We will cover multiple solutions.

Fix Chromium does not show text properly

Cause

The chromium GPUCache index is corrupted after the update, text and images in websites not show properly.

Solution

The solution is to remove the corrupted chromium cache by resetting the chromium GPUCache with deleting the GPUCache folder.

$ rm -rf ~/.config/chromium/Default/GPUCache

Chromium – Settings – System

Then the setting should be made, go to settings at the top right under the ellipsis menu and disable the option Use hardware acceleration when available.

Chromium broswer does not show text websites properly and images displayed confused

This is a preventive measure to avoid blocking the settings page itself.

Alternatively, the url can be entered in the browser:
chrome://settings/system

Fix Chrome does not show text properly

Chrome browser cache folders are resetting under this path.

$ rm -rf ~/.config/google-chromium/Default/GPUCache

If you can’t even open settings properly then you can check the next option. You can try to start Chrome with the option disable-gpu.

$ google-chrome --disable-gpu

Delete Chrome config and cache

If you are not using gmail-backed profile then you can delete content of.

$ ~/.config/google-chrome/
$ ~/.cache/google-chrome/

Now after next restart the problem will be fixed.

The above solutions should be enough to get proper show text and images of pages in Chrome for Ubuntu and Linux Mint.

Conclusion

After resetting the chrome or chromium browser cache, the web sites with text and image content are displayed correctly again, to prevent the cache index from becoming unusable again after the next update, the hardware acceleration will by disabled. This problem may happen in Linux Mint and Ubuntu. This tutorial will cover several solutions that contribute to a solution and make the browser usable again.