LinuxCommandLibrary

gpg-card

OpenPGP and PIV smartcard management

TLDR

List available smartcards

$ gpg-card list
copy
Display card information
$ gpg-card info
copy
Change PIN
$ gpg-card passwd
copy
Set cardholder name
$ gpg-card name
copy
Fetch public key from card URL
$ gpg-card fetch
copy
Generate keys on card
$ gpg-card generate
copy
Reset card to factory defaults
$ gpg-card factory-reset
copy

SYNOPSIS

gpg-card [options] [command [args]]

DESCRIPTION

gpg-card is a GnuPG tool for managing OpenPGP and PIV smartcards. It provides an interactive interface for configuring cards, managing PINs, generating keys, and transferring keys to smartcards.
Introduced in GnuPG 2.3 as a replacement for the older gpg --card-edit workflow, it offers a more streamlined command-line experience for smartcard operations.

SUBCOMMANDS

list

List available cards and readers.
info
Display card information.
name
Set cardholder name.
lang
Set language preference.
url
Set public key URL.
fetch
Fetch key from URL on card.
passwd
Change PIN, Admin PIN, or Reset Code.
generate
Generate keys on card.
keytocard
Transfer key to card.
forcesig
Toggle signature PIN requirement.
factory-reset
Reset card to factory defaults.

SEE ALSO

gpg(1), gpg-agent(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community