LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

fgconsole

print foreground virtual terminal number

TLDR

Print current terminal number
$ fgconsole
copy
Print next unallocated virtual terminal number
$ fgconsole --next-available
copy

SYNOPSIS

fgconsole [options]

DESCRIPTION

fgconsole prints the number of the foreground virtual terminal. If the terminal is serial, it prints "serial" instead of a number.Part of kbd package for console management utilities.

PARAMETERS

-n, --next-available

Print next unallocated VT number
-V, --version
Print version number and exit
-h, --help
Display help and exit

CAVEATS

Only works on Linux console. Returns error if not on a virtual terminal. Part of kbd package.

SEE ALSO

chvt(1), deallocvt(1), dumpkeys(1)

Copied to clipboard
Kai