how to query fTPM from linux terminal

To query fTPM (firmware-based TPM) from the Linux terminal, you can use the tpm2-tools package, which provides a set of command-line tools for interacting with the TPM.

Here are the steps to query fTPM from the Linux terminal:

Install the tpm2-tools package if it is not already installed on your system. You can do this by running the following command:

sudo apt-get install tpm2-tools

This command is for Ubuntu or Debian-based distributions. If you are using a different distribution, you may need to use a different package manager.

Check that your system has a TPM device by running the following command:

sudo tpm2-abrmd

This command starts the TPM Access Broker and Resource Manager daemon and checks that the TPM device is available.

Use the tpm2_getcap command to query the capabilities of your TPM. For example, to get information about the TPM algorithms, run the following command:

tpm2_getcap algorithms

This command will display a list of the supported TPM algorithms.

Use other tpm2-tools commands to query other aspects of the TPM, such as the TPM PCR (Platform Configuration Registers), keys, and certificates.

For example, to get information about the TPM PCR values, run the following command:

tpm2_pcrread

This command will display the current values of the TPM PCR registers.

These are just a few examples of the many commands available in the tpm2-tools package for querying fTPM from the Linux terminal. You can find more information about these commands and their usage in the tpm2-tools documentation or by running the commands with the —help option.

https://tpm2-tools.readthedocs.io/en/latest/ https://tpm2-software.github.io https://tpm2-software.github.io/software/