opensc-tool1
Generic smart card utility
Usage
opensc-tool [OPTIONS]
Overview
The opensc-tool utility can be used from the command line to perform miscellaneous smart card operations such as getting the card ATR or sending arbitrary APDU commands to a card.
Options
-
--version -
Print the OpenSC package release version.
-
--atr, -a -
Print the Answer To Reset (ATR) of the card. Output is in hex byte format
-
--card-driver driver, -c driver -
Use the given card driver. The default is to auto-detect the correct card driver. The literal value ? lists all available card drivers.
--list-algorithms,
Lists algorithms supported by card
-
--info, -i -
Print information about OpenSC, such as version and enabled components.
-
--list-drivers, -D -
List all installed card drivers.
-
--list-files, -f -
Recursively list all files stored on card.
-
--list-readers, -l -
List all configured readers.
-
--name, -n -
Print the name of the inserted card (driver).
-
--get-conf-entry conf, -G conf -
Get configuration key, format: section:name:key
-
--set-conf-entry conf, -S conf -
Set configuration key, format: section:name:key:value
-
--reader arg, -r arg -
Number of the reader to use. By default, the first reader with a present card is used. If arg is an ATR, the reader with a matching card will be chosen.
-
--reset [type], -
Resets the card in reader. The default reset type is cold, but warm reset is also possible.
-
--send-apdu apdu, -s apdu -
Sends an arbitrary APDU to the card in the format AA:BB:CC:DD:EE:FF.... Use this option multiple times to send more than one APDU.
The built-in card drivers may send additional APDUs for detection and initialization. To avoid this behavior, you may additionally specify
--card-driverdefault.
-
--serial -
Print the card serial number (normally the ICCSN). Output is in hex byte format
-
--verbose, -v -
Causes
opensc-toolto be more verbose. Specify this flag several times to enable debug output in the opensc library.
-
--wait, -w -
Wait for a card to be inserted.
Releases
12 releases since Debian 3.1 (Sarge); the text changed 11 times.
--get-conf-entry since Debian 10 (Buster);
--info since Debian 7 (Wheezy);
--name since Debian 7 (Wheezy);
--reset since Debian 10 (Buster);
--serial since Debian 4.0 (Etch);
--set-conf-entry since Debian 10 (Buster);
--version since Debian 11 (Bullseye);
--wait since Debian 7 (Wheezy);
-G since Debian 10 (Buster);
-S since Debian 10 (Buster);
-i since Debian 7 (Wheezy);
-n since Debian 7 (Wheezy);
-w since Debian 7 (Wheezy).
--list-rdrivers until Debian 6.0 (Squeeze);
-R until Debian 6.0 (Squeeze).