How To Install python3-pystemd on AlmaLinux 8
Introduction
In this tutorial we learn how to install python3-pystemd
on AlmaLinux 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 AlmaLinux 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 AlmaLinux 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 AlmaLinux 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 AlmaLinux 8
To uninstall only the python3-pystemd
package we can use the following command:
sudo dnf remove python3-pystemd
References
Summary
In this tutorial we learn how to install python3-pystemd
on AlmaLinux 8 using yum and dnf.