FGCONSOLE(1) General Commands Manual FGCONSOLE(1)

# [NAME](#NAME)

fgconsole - print the number of the active VT.

# [SYNOPSIS](#SYNOPSIS)

**fgconsole** \[*options*]

# [DESCRIPTION](#DESCRIPTION)

If the active Virtual Terminal is */dev/ttyN*, then prints *N* on standard output.

If the console is a serial console, then "serial" is printed instead.

# [OPTIONS](#OPTIONS)

[**-n**, **--next-available**](#n)

Will show the next unallocated virtual terminal. Normally 6 virtual terminals are allocated, with number 7 used for X; this will return "8" in this case.

[**-C**, **--console**=*DEV*](#C)

the console device to be used.

[**-V**, **--version**](#V)

print version number.

[**-h**, **--help**](#h)

print this usage message.

# [NOTES](#NOTES)

Under *devfs*, the consoles are in */dev/vc/N*. *devfsd* may maintain symlinks for compatibility.

# [AUTHORS](#AUTHORS)

Andries Brouwer &lt;aeb@cwi.nl&gt;  
Manpage by Alastair McKinstry &lt;mckinstry@computer.org&gt;

# [SEE ALSO](#SEE_ALSO)

[**chvt**(1)](/man/os/kbd/chvt.1), [**deallocvt**(1)](/man/os/kbd/deallocvt.1), [**openvt**(1)](/man/os/kbd/openvt.1)

24 October 2024 kbd

---

Document: fgconsole(1) from kbd 2.10.0-r4 (Chainguard OS)
Source: https://github.com/legionus/kbd
