How To Install swtpm-tools on CentOS 8

swtpm-tools is Tools for the TPM emulator

Introduction

In this tutorial we learn how to install swtpm-tools on CentOS 8.

What is swtpm-tools

Tools for the TPM emulator from the swtpm package

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

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

sudo dnf -y install swtpm-tools

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

sudo yum -y install swtpm-tools

How To Uninstall swtpm-tools on CentOS 8

To uninstall only the swtpm-tools package we can use the following command:

sudo dnf remove swtpm-tools

swtpm-tools Package Contents on CentOS 8

/etc/swtpm-localca.conf
/etc/swtpm-localca.options
/etc/swtpm_setup.conf
/usr/bin/swtpm_bios
/usr/bin/swtpm_cert
/usr/bin/swtpm_ioctl
/usr/bin/swtpm_setup
/usr/lib/.build-id
/usr/lib/.build-id/83
/usr/lib/.build-id/83/2bc559d40dafc14ab0c4c43e9cbd046edf5d19
/usr/lib/.build-id/98
/usr/lib/.build-id/98/c75ef55ed5619985ebf9b32c38fdf66be3bc15
/usr/lib/.build-id/af
/usr/lib/.build-id/af/badbbf0823914b484a11f564daf9fb2acfa486
/usr/lib/python3.6/site-packages/py_swtpm_localca/__init__.py
/usr/lib/python3.6/site-packages/py_swtpm_localca/__pycache__
/usr/lib/python3.6/site-packages/py_swtpm_localca/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/py_swtpm_localca/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/py_swtpm_localca/__pycache__/swtpm_localca.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/py_swtpm_localca/__pycache__/swtpm_localca.cpython-36.pyc
/usr/lib/python3.6/site-packages/py_swtpm_localca/__pycache__/swtpm_localca_conf.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/py_swtpm_localca/__pycache__/swtpm_localca_conf.cpython-36.pyc
/usr/lib/python3.6/site-packages/py_swtpm_localca/__pycache__/swtpm_utils.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/py_swtpm_localca/__pycache__/swtpm_utils.cpython-36.pyc
/usr/lib/python3.6/site-packages/py_swtpm_localca/swtpm_localca.py
/usr/lib/python3.6/site-packages/py_swtpm_localca/swtpm_localca_conf.py
/usr/lib/python3.6/site-packages/py_swtpm_localca/swtpm_utils.py
/usr/lib/python3.6/site-packages/py_swtpm_setup/__init__.py
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/swtpm.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/swtpm.cpython-36.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/swtpm_setup.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/swtpm_setup.cpython-36.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/swtpm_setup_conf.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/swtpm_setup_conf.cpython-36.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/swtpm_utils.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/__pycache__/swtpm_utils.cpython-36.pyc
/usr/lib/python3.6/site-packages/py_swtpm_setup/swtpm.py
/usr/lib/python3.6/site-packages/py_swtpm_setup/swtpm_setup.py
/usr/lib/python3.6/site-packages/py_swtpm_setup/swtpm_setup_conf.py
/usr/lib/python3.6/site-packages/py_swtpm_setup/swtpm_utils.py
/usr/lib/python3.6/site-packages/swtpm_localca-0.5.2-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/swtpm_localca-0.5.2-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/swtpm_localca-0.5.2-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/swtpm_localca-0.5.2-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/swtpm_setup-0.5.2-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/swtpm_setup-0.5.2-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/swtpm_setup-0.5.2-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/swtpm_setup-0.5.2-py3.6.egg-info/requires.txt
/usr/lib/python3.6/site-packages/swtpm_setup-0.5.2-py3.6.egg-info/top_level.txt
/usr/share/doc/swtpm-tools
/usr/share/doc/swtpm-tools/README
/usr/share/man/man8/swtpm-localca.8.gz
/usr/share/man/man8/swtpm-localca.conf.8.gz
/usr/share/man/man8/swtpm-localca.options.8.gz
/usr/share/man/man8/swtpm_bios.8.gz
/usr/share/man/man8/swtpm_cert.8.gz
/usr/share/man/man8/swtpm_ioctl.8.gz
/usr/share/man/man8/swtpm_setup.8.gz
/usr/share/man/man8/swtpm_setup.conf.8.gz
/usr/share/man/man8/swtpm_setup.sh.8.gz
/usr/share/swtpm
/usr/share/swtpm/swtpm-create-user-config-files
/usr/share/swtpm/swtpm-localca
/var/lib/swtpm-localca

References

Summary

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