How To Install python3-systemd on Rocky Linux 8

In this tutorial we learn how to install python3-systemd on Rocky Linux 8. python3-systemd is Python module wrapping systemd functionality

Introduction

In this tutorial we learn how to install python3-systemd on Rocky Linux 8.

What is python3-systemd

Python module for native access to the systemd facilities. Functionality includes sending of structured messages to the journal and reading journal files, querying machine and boot identifiers and a lists of message identifiers provided by systemd. Other functionality provided by libsystemd is also wrapped.

We can use yum or dnf to install python3-systemd on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install python3-systemd.

Install python3-systemd on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install python3-systemd using dnf by running the following command:

sudo dnf -y install python3-systemd

Install python3-systemd on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install python3-systemd

How To Uninstall python3-systemd on Rocky Linux 8

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

sudo dnf remove python3-systemd

python3-systemd Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/17
/usr/lib/.build-id/17/22d8cee25e4407f644db62da4582eb8ebedf90
/usr/lib/.build-id/4f
/usr/lib/.build-id/4f/63fbc63714f05c31ecabcc20bd1c1fc27dd8f7
/usr/lib/.build-id/a5
/usr/lib/.build-id/a5/4e17ce44e6a7f9033eccaa6c1ff21f582b518c
/usr/lib/.build-id/da
/usr/lib/.build-id/da/ecc8c4936537ef17844ec84047e2b7d5068306
/usr/lib/.build-id/fe
/usr/lib/.build-id/fe/f6980e881941b73384ac7d16c75c20ade7e538
/usr/lib64/python3.6/site-packages/systemd
/usr/lib64/python3.6/site-packages/systemd/__init__.py
/usr/lib64/python3.6/site-packages/systemd/__pycache__
/usr/lib64/python3.6/site-packages/systemd/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/systemd/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/systemd/__pycache__/daemon.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/systemd/__pycache__/daemon.cpython-36.pyc
/usr/lib64/python3.6/site-packages/systemd/__pycache__/journal.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/systemd/__pycache__/journal.cpython-36.pyc
/usr/lib64/python3.6/site-packages/systemd/_daemon.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/systemd/_journal.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/systemd/_reader.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/systemd/daemon.py
/usr/lib64/python3.6/site-packages/systemd/id128.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/systemd/journal.py
/usr/lib64/python3.6/site-packages/systemd/login.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/systemd/test
/usr/lib64/python3.6/site-packages/systemd/test/__pycache__
/usr/lib64/python3.6/site-packages/systemd/test/__pycache__/test_daemon.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/systemd/test/__pycache__/test_daemon.cpython-36.pyc
/usr/lib64/python3.6/site-packages/systemd/test/__pycache__/test_journal.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/systemd/test/__pycache__/test_journal.cpython-36.pyc
/usr/lib64/python3.6/site-packages/systemd/test/__pycache__/test_login.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/systemd/test/__pycache__/test_login.cpython-36.pyc
/usr/lib64/python3.6/site-packages/systemd/test/test_daemon.py
/usr/lib64/python3.6/site-packages/systemd/test/test_journal.py
/usr/lib64/python3.6/site-packages/systemd/test/test_login.py
/usr/lib64/python3.6/site-packages/systemd_python-234-py3.6.egg-info
/usr/share/licenses/python3-systemd
/usr/share/licenses/python3-systemd/LICENSE.txt

References

Summary

In this tutorial we learn how to install python3-systemd on Rocky Linux 8 using yum and dnf.