chvt command in Linux with examples

chvt command in Linux systems is used to switch between the different TTY (TeleTYpewriter) terminals available. These are essentially Virtual Terminals, which are toggled when the keys Ctrl + Alt + FunKey(1-6) are pressed. There are usually 6 TTY terminals, and the chvt command is used to switch between these terminals, without the use of function keys.

Note: This command needs Root Privilege to be executed.

Syntax:

chvt N

chvt with different N: This command takes an integer value for N, ranging from 1 to 6 (Since only 6 TTYs are present in the Linux OS). When an integer which is out of this range is specified, a blank screen pops up. To exit this screen, Alt + FunKey(7) needs to be pressed.

Note: The command fbcat which is used in the TTY terminals, serves to capture the screen of TTY terminals.

Example 1:

sudo chvt 1

Example 2:

sudo chvt 3



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.