How To Install polkit on CentOS 8

polkit is An authorization framework

Introduction

In this tutorial we learn how to install polkit on CentOS 8.

What is polkit

polkit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes.

We can use yum or dnf to install polkit on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install polkit.

Install polkit on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install polkit

Install polkit on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install polkit using yum by running the following command:

sudo yum -y install polkit

How To Uninstall polkit on CentOS 8

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

sudo dnf remove polkit

polkit Package Contents on CentOS 8

/etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf
/etc/pam.d/polkit-1
/etc/polkit-1
/etc/polkit-1/rules.d
/etc/polkit-1/rules.d/50-default.rules
/usr/bin/pkaction
/usr/bin/pkcheck
/usr/bin/pkexec
/usr/bin/pkttyagent
/usr/lib/.build-id
/usr/lib/.build-id/17
/usr/lib/.build-id/17/da32307f543e33f3c7727196c9b3acb900ca15
/usr/lib/.build-id/22
/usr/lib/.build-id/22/3306d1d81bde76ae7a6dd74b7bf5cb758f38d5
/usr/lib/.build-id/23
/usr/lib/.build-id/23/82717c32605fed1ad778420e446b06f949316f
/usr/lib/.build-id/45
/usr/lib/.build-id/45/5888466aaf7e9245ef2073d36beefec4a50a4e
/usr/lib/.build-id/5f
/usr/lib/.build-id/5f/ff58256c17f27eebfe213857f9978ebcb3604e
/usr/lib/.build-id/82
/usr/lib/.build-id/82/d40c3dd45b093a95ffe584feba25f3c2160efd
/usr/lib/polkit-1
/usr/lib/polkit-1/polkit-agent-helper-1
/usr/lib/polkit-1/polkitd
/usr/lib/systemd/system/polkit.service
/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service
/usr/share/doc/polkit
/usr/share/doc/polkit/COPYING
/usr/share/doc/polkit/NEWS
/usr/share/doc/polkit/README
/usr/share/locale/cs/LC_MESSAGES/polkit-1.mo
/usr/share/locale/da/LC_MESSAGES/polkit-1.mo
/usr/share/locale/de/LC_MESSAGES/polkit-1.mo
/usr/share/locale/hr/LC_MESSAGES/polkit-1.mo
/usr/share/locale/hu/LC_MESSAGES/polkit-1.mo
/usr/share/locale/id/LC_MESSAGES/polkit-1.mo
/usr/share/locale/pl/LC_MESSAGES/polkit-1.mo
/usr/share/locale/pt_BR/LC_MESSAGES/polkit-1.mo
/usr/share/locale/sk/LC_MESSAGES/polkit-1.mo
/usr/share/locale/sv/LC_MESSAGES/polkit-1.mo
/usr/share/locale/tr/LC_MESSAGES/polkit-1.mo
/usr/share/locale/uk/LC_MESSAGES/polkit-1.mo
/usr/share/locale/zh_CN/LC_MESSAGES/polkit-1.mo
/usr/share/locale/zh_TW/LC_MESSAGES/polkit-1.mo
/usr/share/man/man1/pkaction.1.gz
/usr/share/man/man1/pkcheck.1.gz
/usr/share/man/man1/pkexec.1.gz
/usr/share/man/man1/pkttyagent.1.gz
/usr/share/man/man8/polkit.8.gz
/usr/share/man/man8/polkitd.8.gz
/usr/share/polkit-1
/usr/share/polkit-1/actions
/usr/share/polkit-1/actions/org.freedesktop.policykit.policy
/usr/share/polkit-1/rules.d
/etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf
/etc/pam.d/polkit-1
/etc/polkit-1
/etc/polkit-1/rules.d
/etc/polkit-1/rules.d/50-default.rules
/usr/bin/pkaction
/usr/bin/pkcheck
/usr/bin/pkexec
/usr/bin/pkttyagent
/usr/lib/.build-id
/usr/lib/.build-id/24
/usr/lib/.build-id/24/f36dd5bca435fe69f3206e1f28ffba8736ee98
/usr/lib/.build-id/45
/usr/lib/.build-id/45/a5cce55552890b4c4b6ef2edd7e6a827167787
/usr/lib/.build-id/71
/usr/lib/.build-id/71/ab4a4d7f352c892fd45e3fbb2c7e402167c9b6
/usr/lib/.build-id/be
/usr/lib/.build-id/be/518cbf6af893c19e8f12982b81840f576cf1e8
/usr/lib/.build-id/e3
/usr/lib/.build-id/e3/aa60d6dc515a06222798c2538cc8f2ebbb5601
/usr/lib/.build-id/e7
/usr/lib/.build-id/e7/429561453bdf2febd8ac15553dd21ad2cfcc16
/usr/lib/polkit-1
/usr/lib/polkit-1/polkit-agent-helper-1
/usr/lib/polkit-1/polkitd
/usr/lib/systemd/system/polkit.service
/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service
/usr/share/doc/polkit
/usr/share/doc/polkit/COPYING
/usr/share/doc/polkit/NEWS
/usr/share/doc/polkit/README
/usr/share/locale/cs/LC_MESSAGES/polkit-1.mo
/usr/share/locale/da/LC_MESSAGES/polkit-1.mo
/usr/share/locale/de/LC_MESSAGES/polkit-1.mo
/usr/share/locale/hr/LC_MESSAGES/polkit-1.mo
/usr/share/locale/hu/LC_MESSAGES/polkit-1.mo
/usr/share/locale/id/LC_MESSAGES/polkit-1.mo
/usr/share/locale/pl/LC_MESSAGES/polkit-1.mo
/usr/share/locale/pt_BR/LC_MESSAGES/polkit-1.mo
/usr/share/locale/sk/LC_MESSAGES/polkit-1.mo
/usr/share/locale/sv/LC_MESSAGES/polkit-1.mo
/usr/share/locale/tr/LC_MESSAGES/polkit-1.mo
/usr/share/locale/uk/LC_MESSAGES/polkit-1.mo
/usr/share/locale/zh_CN/LC_MESSAGES/polkit-1.mo
/usr/share/locale/zh_TW/LC_MESSAGES/polkit-1.mo
/usr/share/man/man1/pkaction.1.gz
/usr/share/man/man1/pkcheck.1.gz
/usr/share/man/man1/pkexec.1.gz
/usr/share/man/man1/pkttyagent.1.gz
/usr/share/man/man8/polkit.8.gz
/usr/share/man/man8/polkitd.8.gz
/usr/share/polkit-1
/usr/share/polkit-1/actions
/usr/share/polkit-1/actions/org.freedesktop.policykit.policy
/usr/share/polkit-1/rules.d

References

Summary

In this tutorial we learn how to install polkit on CentOS 8 using yum and dnf.