# FGCONSOLE - print the number of the active VT. - man(1) - [phpMan]

> **TLDR:** Print the number of the foreground virtual terminal.
>
- Print current terminal number or `serial` if the terminal is serial:
  `fgconsole`
- Print the next unallocated virtual terminal:
  `fgconsole {{-n|--next-available}}`

*Source: tldr-pages*

---

[_FGCONSOLE_(1)](https://www.chedong.com/phpMan.php/man/FGCONSOLE/1/markdown)                           General Commands Manual                          [_FGCONSOLE_(1)](https://www.chedong.com/phpMan.php/man/FGCONSOLE/1/markdown)

## NAME
       fgconsole - print the number of the active VT.


## SYNOPSIS
       **fgconsole **[ **-h --help **| **-V --version **| **-n --next-available **]

## 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.

       _-h_ _--help_
              Prints short usage message and exits.

       _-V_ _--version_
              Prints version number and exits.

       _--next-available_
              Will  show the next unallocated virtual terminal. Normally 6 virtual terminals are al‐
              located, with number 7 used for X; this will return "8" in this case.


## NOTES
       Under _devfs_, the consoles are in _/dev/vc/N_.  _devfsd_ may maintain symlinks for compatibility.

## SEE ALSO
       [**chvt**(1)](https://www.chedong.com/phpMan.php/man/chvt/1/markdown).


kbd                                       14 February 2002                              [_FGCONSOLE_(1)](https://www.chedong.com/phpMan.php/man/FGCONSOLE/1/markdown)
