How To Install usbguard on CentOS 8

usbguard is A tool for implementing USB device usage policy A tool for implementing USB device usage policy

Introduction

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

What is usbguard

The USBGuard software framework helps to protect your computer against rogue USB devices by implementing basic whitelisting/blacklisting capabilities based on USB device attributes. usbguard 1.0.0 2.el8 x86_64 538 k usbguard-1.0.0-2.el8.src.rpm appstream A tool for implementing USB device usage policy https GPLv2+ The USBGuard software framework helps to protect your computer against rogue USB devices by implementing basic whitelisting/blacklisting capabilities based on USB device attributes.

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

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

sudo dnf -y install usbguard

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

sudo yum -y install usbguard

How To Uninstall usbguard on CentOS 8

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

sudo dnf remove usbguard

usbguard Package Contents on CentOS 8

/etc/usbguard
/etc/usbguard/IPCAccessControl.d
/etc/usbguard/rules.conf
/etc/usbguard/rules.d
/etc/usbguard/usbguard-daemon.conf
/usr/bin/usbguard
/usr/lib/.build-id
/usr/lib/.build-id/06
/usr/lib/.build-id/06/f337c247273a5fb211702ce113d053f0d2f5b8
/usr/lib/.build-id/5e
/usr/lib/.build-id/5e/6de80fcc2bd3a83f5f2a5173aff63ba9e660a9
/usr/lib/.build-id/eb
/usr/lib/.build-id/eb/2b320b6379e83db1800b695cc0e1c1a7df7bd6
/usr/lib/systemd/system/usbguard.service
/usr/lib64/libusbguard.so.1
/usr/lib64/libusbguard.so.1.0.0
/usr/sbin/usbguard-daemon
/usr/share/bash-completion/completions/usbguard
/usr/share/doc/usbguard
/usr/share/doc/usbguard/CHANGELOG.md
/usr/share/doc/usbguard/README.adoc
/usr/share/licenses/usbguard
/usr/share/licenses/usbguard/LICENSE
/usr/share/man/man1/usbguard.1.gz
/usr/share/man/man5/usbguard-daemon.conf.5.gz
/usr/share/man/man5/usbguard-rules.conf.5.gz
/usr/share/man/man8/usbguard-daemon.8.gz
/var/log/usbguard
/etc/usbguard
/etc/usbguard/IPCAccessControl.d
/etc/usbguard/rules.conf
/etc/usbguard/rules.d
/etc/usbguard/usbguard-daemon.conf
/usr/bin/usbguard
/usr/lib/.build-id
/usr/lib/.build-id/b8
/usr/lib/.build-id/b8/bf4ffa393a6ab064082c1ab526bc2a35fe107f
/usr/lib/.build-id/ce
/usr/lib/.build-id/ce/3537e40df683a502ecc9370fd64656198926eb
/usr/lib/.build-id/ea
/usr/lib/.build-id/ea/8e847277e42080c3041c33e2a52eba4b146f56
/usr/lib/libusbguard.so.1
/usr/lib/libusbguard.so.1.0.0
/usr/lib/systemd/system/usbguard.service
/usr/sbin/usbguard-daemon
/usr/share/bash-completion/completions/usbguard
/usr/share/doc/usbguard
/usr/share/doc/usbguard/CHANGELOG.md
/usr/share/doc/usbguard/README.adoc
/usr/share/licenses/usbguard
/usr/share/licenses/usbguard/LICENSE
/usr/share/man/man1/usbguard.1.gz
/usr/share/man/man5/usbguard-daemon.conf.5.gz
/usr/share/man/man5/usbguard-rules.conf.5.gz
/usr/share/man/man8/usbguard-daemon.8.gz
/var/log/usbguard

References

Summary

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