Manage virtual terminals, switch sessions, and inspect who is logged in on Linux. 25.11.2025 | reading time: 2 min Logical consoles (virtual terminals like tty1..tty6) let a user work on a machine without X, recover a stuck GUI and run low-level maintenance; this short guide shows concrete commands to list, switch, start and secure those sessions. Hands-on: switch and inspect Try these commands to check and change the active virtual terminal: ``` $ fgconsole 1 $ sudo chvt 2 $ fgconsole 2 ``` The first line shows the current VT, `chvt` switches the active VT and requires root; use this to move to a rescue login or a specific getty. Spawn a fresh session and lock it Start a shell on a new VT and protect it: ``` $ sudo openvt -s -- /bin/bash # inside new VT run $ vlock ``` `openvt` creates a session on an unused VT, and `vlock` locks the console for local-only access; both actions typically need root privileges. Permissions and system integration Virtual terminals are device files like /dev/tty1 and are managed by getty services under systemd (for example `getty@tty1.service`); changing VTs or spawning consoles requires root or appropriate capabilities, and systemd's `loginctl` helps inspect active sessions and seats. Real-world uses and caveats Use console switching for recovery, kiosk setups or multi-seat installations; prefer `loginctl` to audit sessions, `fgconsole` and `chvt` for quick local switching, and remember remote serial consoles behave differently and need separate handling. Next steps and practice Experiment on a non-production machine: switch VTs, start shells with `openvt`, and view sessions with `loginctl list-sessions`; to deepen skills consider formal training and exam prep at bitsandbytes.academy for certifications like CompTIA Linux+ or LPIC-1. Join Bits & Bytes Academy First class LINUX exam preparation. utilities processes boot-process security infrastructure