How To Install systemd on Ubuntu 20.04

In this tutorial we learn how to install systemd on Ubuntu 20.04. systemd is system and service manager system and service manager

Introduction

In this tutorial we learn how to install systemd on Ubuntu 20.04.

What is systemd

systemd is:

systemd is a system and service manager for Linux. It provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux control groups, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic.

systemd is compatible with SysV and LSB init scripts and can work as a drop-in replacement for sysvinit.

Installing the systemd package will not switch your init system unless you boot with init=/lib/systemd/systemd or install systemd-sysv in addition. Task: minimal, ubuntu-core

Package: systemd Architecture: amd64 Version: 245.4-4ubuntu3 Multi-Arch: foreign Priority: important Section: admin Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian systemd Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 15084 Pre-Depends: libblkid1 (>= 2.24), libc6 (>= 2.30), libgcrypt20 (>= 1.8.0), liblz4-1 (>= 0.0~r122), liblzma5 (>= 5.1.1alpha+20120614), libselinux1 (>= 2.1.9) Depends: libacl1 (>= 2.2.23), libapparmor1 (>= 2.9.0-3+exp2), libaudit1 (>= 1:2.2.1), libcap2 (>= 1:2.24-9~), libcrypt1 (>= 1:4.4.0), libcryptsetup12 (>= 2:2.0.1), libgnutls30 (>= 3.6.12), libgpg-error0 (>= 1.14), libidn2-0 (>= 2.0.0), libip4tc2 (>= 1.8.3), libkmod2 (>= 5~), liblz4-1 (>= 0.0~r130), libmount1 (>= 2.30), libpam0g (>= 0.99.7.1), libpcre2-8-0 (>= 10.22), libseccomp2 (>= 2.4.1), libsystemd0 (= 245.4-4ubuntu3), systemd-timesyncd | time-daemon, util-linux (>= 2.27.1), mount (>= 2.26), adduser Recommends: dbus, networkd-dispatcher Suggests: systemd-container, policykit-1 Conflicts: consolekit, libpam-ck-connector, systemd-shim, upstart Breaks: python-dbusmock (« 0.18), python3-dbusmock (« 0.18), systemd-shim (« 10-4~) Filename: pool/main/s/systemd/systemd_245.4-4ubuntu3_amd64.deb Size: 3795776 MD5sum: 2529c1980daa1f26dab931b1b739f196 SHA1: 29a79ae4edee4964ac34ddba0fd0a47c2c4a49d0 SHA256: f081921d83e6378aee0576a1e3f1339a35c9302c46fc501b087cd762145597d8 Homepage: https://www.freedesktop.org/wiki/Software/systemd Description-en: system and service manager systemd is a system and service manager for Linux. It provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux control groups, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic.

systemd is compatible with SysV and LSB init scripts and can work as a drop-in replacement for sysvinit.

Installing the systemd package will not switch your init system unless you boot with init=/lib/systemd/systemd or install systemd-sysv in addition. Task: minimal, ubuntu-core

There are three methods to install systemd on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install systemd Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install systemd using apt-get by running the following command:

sudo apt-get -y install systemd

Install systemd Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install systemd using apt by running the following command:

sudo apt -y install systemd

Install systemd Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install systemd using aptitude by running the following command:

sudo aptitude -y install systemd

How To Uninstall systemd on Ubuntu 20.04

To uninstall only the systemd package we can use the following command:

sudo apt-get remove systemd

Uninstall systemd And Its Dependencies

To uninstall systemd and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove systemd

Remove systemd Configurations and Data

To remove systemd configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge systemd

Remove systemd configuration, data, and all of its dependencies

We can use the following command to remove systemd configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge systemd

References

Summary

In this tutorial we learn how to install systemd package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.