LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

chvt

Switch the foreground virtual terminal

TLDR

Switch the console to TTY number N (requires root)
$ sudo chvt [N]
copy

SYNOPSIS

chvt N

DESCRIPTION

chvt changes the foreground virtual terminal to terminal N. Virtual terminals (VTs) are the text consoles accessible via Ctrl+Alt+F1 through F7 on most Linux systems.This is equivalent to pressing Ctrl+Alt+FN but can be done programmatically or when keyboard shortcuts are unavailable.

PARAMETERS

N

The virtual terminal number to switch to (typically 1-7)

INSTALL

sudo apt install kbd
copy
sudo dnf install kbd
copy
sudo pacman -S kbd
copy
sudo apk add kbd
copy
sudo zypper install kbd
copy
nix profile install nixpkgs#kbd
copy

CAVEATS

Requires root privileges. The target VT must exist. On systems with graphical desktop, VT7 or VT1 is typically the X/Wayland session. Available VTs depend on system configuration.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid