yubico-piv-tool command not found

In this troubleshooting guide we learn how to fix yubico-piv-tool command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

yubico-piv-tool: command not found

or when using sudo you get the following error message

sudo: yubico-piv-tool: command not found

Solutions to yubico-piv-tool: command not found

How To Fix yubico-piv-tool: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu yubico-piv-tool is provided by yubico-piv-tool package.

yubico-piv-tool is:

The Yubico PIV tool is used for interacting with the Personal Identity Verification Card (PIV) application on a YubiKey. With it you may generate keys on the device, import keys and certificates, create certificate requests, and other operations. A shared library, a PKCS#11 module a command-line tool are included.

This package contains the command-line tool.

To fix this problem, we can install more using the command below.

sudo apt-get -y install yubico-piv-tool

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install yubico-piv-tool.

sudo apt -y install yubico-piv-tool

Or if you have aptitude installed you can use the following command.

sudo aptitude install yubico-piv-tool

Summary

In this tutorial we learn how to fix yubico-piv-tool command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.