fgconsole(1) on Linux
The text b240702af04e, as Debian 11 (Bullseye) shipped it.
print the number of the active VT.
Flags it lists
-
--help -
--next-available -
--version -
-V -
-h