| TOTP(1) | General Commands Manual | TOTP(1) |
NAME
totp — generate
TOTP codes
SYNOPSIS
totp |
[-d digits]
[-p seconds]
[secret ...] |
DESCRIPTION
totp is a utility for generating TOTP
codes. If no secret is provided as a command-line
argument, secret keys are read newline-separated from the standard
input.
The options are as follows:
EXIT STATUS
The totp utility exits 0 on
success, and >0 if an error occurs.
EXAMPLES
Get TOTP codes for two different secret keys using the standard input:
$ printf
'7KFSJ562KJDK23KD\n7YNEG7J3XBIVYR54' | totpThe same as the above but using command-line arguments:
$ totp 7KFSJ562KJDK23KD
7YNEG7J3XBIVYR54Generate an 8 digit TOTP code that is valid for 60 seconds:
$ totp -d8 -p60
7KFSJ562KJDK23KDSEE ALSO
AUTHORS
Thomas Voss <mail@tvoss.eu>
| April 26, 2026 | TOTP 3.0 |