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.
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.
sudo chvt 1
sudo chvt 3