piv-tool command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
piv-tool: command not found
or when using sudo you get the following error message
sudo: piv-tool: command not found
Solutions to piv-tool: command not found
How To Fix piv-tool: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu piv-tool is provided by opensc package.
opensc is:
OpenSC provides a set of libraries and utilities to access smart cards. It mainly focuses on cards that support cryptographic operations. It facilitates their use in security applications such as mail encryption, authentication, and digital signature. OpenSC implements the PKCS#11 API. Applications supporting this API, such as Iceweasel and Icedove, can use it. OpenSC implements the PKCS#15 standard and aims to be compatible with all software that does so as well.
Before purchasing any cards, please read carefully documentation in https://github.com/OpenSC/OpenSC/wiki - only some cards are supported. Not only does card type matters, but also card version, card OS version and preloaded applet. Only a subset of possible operations may be supported for your card. Card initialization may require third party proprietary software.
This package contains tools for interacting with smart cards.
To fix this problem, we can install more using the command below.
sudo apt-get -y install opensc
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install opensc.
sudo apt -y install opensc
Or if you have aptitude installed you can use the following command.
sudo aptitude install opensc
Summary
In this tutorial we learn how to fix piv-tool command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.