How are virtual consoles related to traditional computer terminals

consoleterminaltty

This is extracted (with some rewording) from Computer terminal and virtual console, which has been closed with a hatnote linking to What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?. Original poster was interested in relations and differences between a computer terminal and a virtual console/terminal. Which is dependent on the operating system? How is it related to text vs graphical terminals?

Quoted from Wikipedia:

A computer terminal is an electronic or electromechanical hardware
device that is used for entering data into, and displaying data from,
a computer or a computing system. Early terminals were inexpensive
devices but very slow compared to punched cards or paper tape for
input, but as the technology improved and video displays were
introduced, terminals pushed these older forms of interaction from the
industry. A related development was timesharing systems, which evolved
in parallel and made up for any inefficiencies of the user's typing
ability with the ability to support multiple users on the same
machine, each at their own terminal.

Quoted from wikipedia:

A virtual console (VC) – also known as a virtual terminal (VT) – is a
conceptual combination of the keyboard and display for a computer user
interface. It is a feature of some operating systems such as UnixWare,
Linux, and BSD, in which the system console of the computer can be
used to switch between multiple virtual consoles to access unrelated
user interfaces. Virtual consoles date back at least to Xenix in the
1980s.

Best Answer

In short: virtual consoles is a feature of the Linux console, and some other operating systems. Computer terminal is a separate device that provides user with a interface to computer. See also discussion about the “virtual terminal” phrase.

The system console (or just “console”, in short) of a computer shows some information from the operating system, such as its startup process. It can also run a command line interpreter, giving feedback of user input and showing textual results of executed commands.

What are virtual consoles? This concept makes one physical console (i. e. display and keyboard) to behave as several different terminal devices that are connected to the computer. It permits for accessing several unrelated user interfaces. In Linux, it’s a very early introduction (by Linus Torvalds) made almost simultaneously with the virtual terminal (vt) code, one of the first Linux features. When a user presses Ctrl+Alt+(F1F12), (s)he instantly switches to the console with specified number, whereas processes on (currently invisible) consoles keep running.

How are VCs related to traditional terminals? Some Unix boxes (seen by me c. 1993) ran several text terminals connected with RS-232. Like with modern virtual consoles, they provided independent user interfaces and different users can be logged on different terminals. But there are differences, too. Only one of these (serial line)-connected terminals was console, other were just terminals. In contrast, main purpose of Linux–BSD virtual consoles is indeed to serve as a system console. Linux kernel may use any of them (and uses the current one) to write emergency messages. And, of course, with traditional terminal several users can simultaneously use keyboard—the thing not possible on virtual consoles.

Traditional terminals can be text-only or graphical, right. And different terminals can have different capabilities, in general. Analogous thing for virtual consoles: with a graphics-capable display, each can be used either for TUI or for graphics. And, in TUI, Linux permits for different setup on each console, including (since 2.6) independent monospace fonts, that entails that VCs may have differences in number of text lines and cpl (albeit the same video mode). The Linux kernel ensures consistency of virtual consoles while text applications are used.

But there is a difference between concepts as well. The Linux kernel exercises its responsibility for a virtual console only in TUI (hardware text mode or emulation via fbdev). To handle graphics in a virtual console, a userspace program (such as an X Window server) must handle switching its console in and out. Whereas a text application may write text on the “screen” when its console is switched off, it’s not possible with graphics, on Linux. One can have graphical mode in more than one VC, and programs will run concurrently. But kernel won’t keep framebuffer content for a graphical application (that it does for TUI applications). Such an application must set its video mode itself, when the user enters the virtual console, and restore the screen.

Related Question