How To Install python3-pystemd on Rocky Linux 8

In this tutorial we learn how to install python3-pystemd on Rocky Linux 8. python3-pystemd is A thin Cython-based wrapper on top of libsystemd

Introduction

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

What is python3-pystemd

This library allows you to talk to systemd over D-Bus from Python, without actually thinking that you are talking to systemd over D-Bus. This allows you to programmatically start/stop/restart/kill and verify service status from systemd point of view, avoiding subprocessing systemctl and then parsing the output to know the result.

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

Install python3-pystemd 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-pystemd using dnf by running the following command:

sudo dnf -y install python3-pystemd

Install python3-pystemd 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-pystemd using yum by running the following command:

sudo yum -y install python3-pystemd

How To Uninstall python3-pystemd on Rocky Linux 8

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

sudo dnf remove python3-pystemd

python3-pystemd Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/16
/usr/lib/.build-id/16/6d92929d8650379c4efe73517451e410716394
/usr/lib/.build-id/bc
/usr/lib/.build-id/bc/3a10fbf040f8331b4565172fe5483b6f72d2ac
/usr/lib/.build-id/bf
/usr/lib/.build-id/bf/04e22682091ece9b66c6f82d239eb0bc7d67e9
/usr/lib/.build-id/e2
/usr/lib/.build-id/e2/c61d0b7db1b59044f261e082f188848d3c8e28
/usr/lib64/python3.6/site-packages/pystemd
/usr/lib64/python3.6/site-packages/pystemd-0.9.0-py3.6.egg-info
/usr/lib64/python3.6/site-packages/pystemd-0.9.0-py3.6.egg-info/PKG-INFO
/usr/lib64/python3.6/site-packages/pystemd-0.9.0-py3.6.egg-info/SOURCES.txt
/usr/lib64/python3.6/site-packages/pystemd-0.9.0-py3.6.egg-info/dependency_links.txt
/usr/lib64/python3.6/site-packages/pystemd-0.9.0-py3.6.egg-info/top_level.txt
/usr/lib64/python3.6/site-packages/pystemd/DBus
/usr/lib64/python3.6/site-packages/pystemd/DBus/__init__.py
/usr/lib64/python3.6/site-packages/pystemd/DBus/__pycache__
/usr/lib64/python3.6/site-packages/pystemd/DBus/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/DBus/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/RELEASE
/usr/lib64/python3.6/site-packages/pystemd/__init__.py
/usr/lib64/python3.6/site-packages/pystemd/__pycache__
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/__version__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/__version__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/base.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/base.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/exceptions.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/exceptions.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/run.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/run.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/utils.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/__pycache__/utils.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/__version__.py
/usr/lib64/python3.6/site-packages/pystemd/base.py
/usr/lib64/python3.6/site-packages/pystemd/base.pyi
/usr/lib64/python3.6/site-packages/pystemd/daemon.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/pystemd/daemon.pyi
/usr/lib64/python3.6/site-packages/pystemd/dbusexc.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/pystemd/dbuslib.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/pystemd/dbuslib.pyi
/usr/lib64/python3.6/site-packages/pystemd/exceptions.py
/usr/lib64/python3.6/site-packages/pystemd/journal.cpython-36m-x86_64-linux-gnu.so
/usr/lib64/python3.6/site-packages/pystemd/machine1
/usr/lib64/python3.6/site-packages/pystemd/machine1/__init__.py
/usr/lib64/python3.6/site-packages/pystemd/machine1/__pycache__
/usr/lib64/python3.6/site-packages/pystemd/machine1/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/machine1/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/machine1/__pycache__/machine.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/machine1/__pycache__/machine.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/machine1/__pycache__/manager.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/machine1/__pycache__/manager.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/machine1/machine.py
/usr/lib64/python3.6/site-packages/pystemd/machine1/manager.py
/usr/lib64/python3.6/site-packages/pystemd/run.py
/usr/lib64/python3.6/site-packages/pystemd/systemd1
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__init__.py
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__pycache__
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__pycache__/manager.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__pycache__/manager.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__pycache__/unit.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__pycache__/unit.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__pycache__/unit_signatures.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/pystemd/systemd1/__pycache__/unit_signatures.cpython-36.pyc
/usr/lib64/python3.6/site-packages/pystemd/systemd1/manager.py
/usr/lib64/python3.6/site-packages/pystemd/systemd1/manager.pyi
/usr/lib64/python3.6/site-packages/pystemd/systemd1/unit.py
/usr/lib64/python3.6/site-packages/pystemd/systemd1/unit.pyi
/usr/lib64/python3.6/site-packages/pystemd/systemd1/unit_signatures.py
/usr/lib64/python3.6/site-packages/pystemd/utils.py
/usr/lib64/python3.6/site-packages/pystemd/utils.pyi
/usr/share/doc/python3-pystemd
/usr/share/doc/python3-pystemd/README.md
/usr/share/licenses/python3-pystemd
/usr/share/licenses/python3-pystemd/LICENSE

References

Summary

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