A simple python script to install a rpm package in Linux

Below is the simple program to install a package named "vsftpd" in linux OS. You need to import "os" module for that.

#!/usr/bin/python3.



import os

try:

   os.system('dnf install vsftpd')

except:

   exit("Failed to install package")        

To view or add a comment, sign in

More articles by VAR elite

Explore content categories