
The Linux console is a
system console
A computer terminal is an electronic or electromechanical computer hardware, hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. Most early computers only had a front panel to ...
internal to the
Linux kernel
The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
. A system console is the device which receives all kernel messages and warnings and which allows logins in single user mode. The Linux console provides a way for the kernel and other processes to send text output to the user, and to receive text input from the user. The user typically enters text with a
computer keyboard
A computer keyboard is a built-in or peripheral input device modeled after the typewriter keyboard which uses an arrangement of buttons or Push-button, keys to act as Mechanical keyboard, mechanical levers or Electronic switching system, electro ...
and reads the output text on a
computer monitor
A computer monitor is an output device that displays information in pictorial or textual form. A discrete monitor comprises a electronic visual display, visual display, support electronics, power supply, Housing (engineering), housing, electri ...
. The Linux kernel supports
virtual console
The Virtual Console was a line of downloadable retro video games for Nintendo's Wii and Wii U home video game consoles and the Nintendo 3DS family of handheld systems. The Virtual Console lineup consisted of titles originally released on pa ...
s – consoles that are logically separate, but which access the same physical keyboard and display. The Linux console (and Linux virtual consoles) are implemented by the VT (virtual terminal) subsystem of the Linux kernel, and do not rely on any
user space
A modern computer operating system usually uses virtual memory to provide separate address spaces or regions of a single address space, called user space and kernel space. This separation primarily provides memory protection and hardware prote ...
software.
This is in contrast to a
terminal emulator
A terminal emulator, or terminal application, is a computer program that emulates a video terminal within some other display architecture. Though typically synonymous with a shell or text terminal, the term ''terminal'' covers all remote term ...
, which is a user space process that emulates a terminal, and is typically used in a graphical display environment.
The Linux console was one of the first features of the kernel and was originally written by
Linus Torvalds
Linus Benedict Torvalds ( , ; born 28 December 1969) is a Finnish software engineer who is the creator and lead developer of the Linux kernel. He also created the distributed version control system Git.
He was honored, along with Shinya Yam ...
in 1991 (see
history of Linux
Linux began in 1991 as a personal project by Finnish student Linus Torvalds to create a new free operating system kernel. The resulting Linux kernel has been marked by constant growth throughout its history. Since the initial release of its s ...
). There are two main implementations:
framebuffer
A framebuffer (frame buffer, or sometimes framestore) is a portion of random-access memory (RAM) containing a bitmap that drives a video display. It is a memory buffer containing data representing all the pixels in a complete video frame. Mode ...
and
text mode
Text mode is a computer display mode in which content is internally represented on a computer screen in terms of characters rather than individual pixels. Typically, the screen consists of a uniform rectangular grid of ''character cells'', ea ...
. The framebuffer implementation is the default in modern
Linux distribution
A Linux distribution, often abbreviated as distro, is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro—if distributed on its own—is oft ...
s, and together with
kernel mode setting, provides kernel-level support for display hardware and features such as showing graphics while the system is booting.
The legacy text mode implementation was used in
PC-compatible
An IBM PC compatible is any personal computer that is hardware- and software-compatible with the IBM Personal Computer (IBM PC) and its subsequent models. Like the original IBM PC, an IBM PC–compatible computer uses an x86-based central pro ...
systems with
CGA,
EGA,
MDA and
VGA
Video Graphics Array (VGA) is a video display controller and accompanying de facto graphics standard, first introduced with the IBM PS/2 line of computers in 1987, which became ubiquitous in the IBM PC compatible industry within three years. T ...
graphics cards. Non-
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
architectures used framebuffer mode because their graphics cards did not implement text mode.
The Linux console uses fixed-size
bitmap
In computing, a bitmap (also called raster) graphic is an image formed from rows of different colored pixels. A GIF is an example of a graphics image file that uses a bitmap.
As a noun, the term "bitmap" is very often used to refer to a partic ...
,
monospace font
A monospaced font, also called a fixed-pitch, fixed-width, or non-proportional font, is a font whose letters and characters each occupy the same amount of horizontal space. This contrasts with Typeface#Proportion, variable-width fonts, where t ...
s, usually defaulting to 8x16 pixels per character.
The Linux console is an optional kernel feature, and most
embedded Linux
The Linux, Linux Operating system is prevalent in embedded systems. As of 2024, developer surveys and industry reports find that Embedded Linux is used in 44%-46% of embedded systems. Due to its Linux range of use, versatility, its large community ...
systems do not enable it. These systems typically provide an alternative user interface (e.g. web based), or boot immediately into a
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
and use this as the primary means of interacting with the user. Other implementations of the Linux console include the
Braille
Braille ( , ) is a Tactile alphabet, tactile writing system used by blindness, blind or visually impaired people. It can be read either on embossed paper or by using refreshable braille displays that connect to computers and smartphone device ...
console to support
refreshable Braille displays
and the
serial port
A serial port is a serial communication Interface (computing), interface through which information transfers in or out sequentially one bit at a time. This is in contrast to a parallel port, which communicates multiple bits simultaneously in Pa ...
console.
Purpose
The Linux console provides a way for the kernel and other processes to output text-based messages to the user, and to receive text-based input from the user. In Linux, several devices can be used as system console: a virtual terminal, serial port, USB serial port, VGA in text-mode, framebuffer. Some modern Linux-based systems have deprecated kernel based text-mode input and output, and instead show a graphical logo or
progress bar
A progress bar is a graphical control element used to visualize the progression of an extended computer operation, such as a download, file transfer, or installation. Sometimes, the graphic is accompanied by a textual representation of the progre ...
while the system is booting, followed by the immediate start of a graphical user interface (e.g. the
X.Org Server
X.Org Server is the free and open-source implementation of the X Window System (X11) display server stewarded by the X.Org Foundation.
Implementations of the client-side X Window System protocol exist in the form of ''X11 libraries'', which ...
on desktop distributions, or SurfaceFlinger on Android).
During kernel boot, the console is commonly used to display the boot log of the kernel. The boot log includes information about detected hardware, and updates on the status of the boot procedure. At this point in time, the kernel is the only software running, and hence logging via user-space (e.g.
syslog
In computing, syslog () is a standard for message logging. It allows separation of the software that generates messages, the system that stores them, and the software that reports and analyzes them. Each message is labeled with a facility code, ...
) is not possible, so the console provides a convenient place to output this information. Once the kernel has finished booting, it runs the
init
In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the operating system. Init is a daemon process that continues running until the system is shut down. It is the direc ...
process (also sending output to the console), which handles booting of the rest of the system including starting any background
daemons.
After the ''init'' boot process is complete, the console will be used to
multiplex
Multiplex may refer to:
Science and technology
* Multiplex communication, combining many signals into one transmission circuit or channel
** Multiplex (television), a group of digital television or radio channels that are combined for broadcast
* ...
multiple
virtual terminal
In Open system (computing), open systems, a virtual terminal (VT) is an application service that:
# Allows Server (computing), host terminals on a multi-User (computing), user computer network, network to interact with other hosts regardless of ...
s (accessible by pressing Ctrl-Alt-F1, Ctrl-Alt-F2 etc., Ctrl-Alt-LeftArrow, Ctrl-Alt-RightArrow, or using ''chvt''). On each ''virtual terminal'', a
getty process is run, which in turn runs ''/bin/login'' to authenticate a user. After authentication, a
command shell
An operating system shell is a computer program that provides relatively broad and direct access to the system on which it runs. The term ''shell'' refers to how it is a relatively thin layer around an operating system.
A shell is generally a ...
will be run. Virtual terminals, like the console, are supported at the Linux kernel level.
The Linux console implements a
terminal type of "linux" and the escape sequences it uses are in the ''console_codes''
man page
A man page (short for manual page) is a form of software documentation found on Unix and Unix-like operating systems. Topics covered include programs, system libraries, system calls, and sometimes local system details. The local host administr ...
.
Virtual consoles
Virtual consoles allow the storage of multiple text buffers, enabling different console programs to run simultaneously but interact with the user in different contexts. From the user's point of view, this creates the illusion of several independent consoles.
Each virtual console can have its own character set and keyboard layout.
Linux 2.6 introduced the ability to load a different font for each virtual console (kernel versions predating 2.6 change the font only on demand).
Text mode console
The
text mode
Text mode is a computer display mode in which content is internally represented on a computer screen in terms of characters rather than individual pixels. Typically, the screen consists of a uniform rectangular grid of ''character cells'', ea ...
implementation is used on PC-based systems with a legacy CGA/EGA/MDA/VGA video card that implements text-based video modes. In text mode, the kernel sends a 2D array of characters to the video card, and the video card converts the characters to pixels for display.
Font, character set and keyboard layout
The text buffer is a part of VGA memory which describes the content of a text screen in terms of
code point
A code point, codepoint or code position is a particular position in a Table (database), table, where the position has been assigned a meaning. The table may be one dimensional (a column), two dimensional (like cells in a spreadsheet), three dime ...
s and character attributes. Code points in the text buffer and font are generally not the same as
encoding
In communications and Data processing, information processing, code is a system of rules to convert information—such as a letter (alphabet), letter, word, sound, image, or gesture—into another form, sometimes data compression, shortened or ...
used in
text terminal
A computer terminal is an electronic or electromechanical hardware device that can be used for entering data into, and transcribing data from, a computer or a computing system. Most early computers only had a front panel to input or display ...
semantics to put characters on the screen. The set of
glyph
A glyph ( ) is any kind of purposeful mark. In typography, a glyph is "the specific shape, design, or representation of a character". It is a particular graphical representation, in a particular typeface, of an element of written language. A ...
s on the screen is determined by the current
font
In metal typesetting, a font is a particular size, weight and style of a ''typeface'', defined as the set of fonts that share an overall design.
For instance, the typeface Bauer Bodoni (shown in the figure) includes fonts " Roman" (or "regul ...
. The text screen is handled by and drivers. There is a utility for altering fonts and terminal encodings called .
The Linux kernel ( driver) has almost complete support for keyboard input (
keyboard layout
A keyboard layout is any specific physical, visual, or functional arrangement of the keys, legends, or key-meaning associations (respectively) of a computer keyboard, mobile phone, or other computer-controlled typographic keyboard. Standard keybo ...
s), but it remains a bit inconsistent because it interacts badly with different character sets. Layouts are loaded by the utility.
These two utilities and corresponding data files are packed in Linux Console Tools http://lct.sourceforge.net/ shipped with many
Linux distribution
A Linux distribution, often abbreviated as distro, is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro—if distributed on its own—is oft ...
s.
Efforts on the
internationalization
Internationalization or Internationalisation is the process of increasing involvement of enterprises in international markets, although there is no agreed definition of internationalization. Internationalization is a crucial strategy not only for ...
of Linux at the kernel level started as early as in 1994 by
Markus Kuhn and
Andries Brouwer.
Text modes
The Linux console is capable of supporting any VGA-style text mode, but the kernel itself has very limited means to set these modes up.
SVGATextMode helps to enable more complex text modes than the standard EGA and VGA modes. It is fully compatible with Console Tools, but has some conflicts with
dosemu
DOSEMU, stylized as dosemu, is a compatibility layer software package that enables DOS operating systems (e.g., MS-DOS, DR-DOS, FreeDOS) and application software to run atop Linux on x86-based PCs (IBM PC compatible computers).
Features
It ...
,
SVGAlib and
display servers.
Currently, there is no support for different modes on different virtual consoles.
Comparison to Windows and DOS
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
(of any version) does not have a fully functional support of the console. The comparable feature there, but for application software only, is the
Win32 console
Windows Console is a GUI application for running console applications in Windows. Windows Console is used for running text-based programs such as operating system shells (e.g. Command Prompt and PowerShell), utilities (e.g. Far Manager) an ...
.
# Unicode supported since
Windows NT
Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
based systems, which allow to switch code pages and use Unicode, but only in window mode. Also, NT systems use own text buffer format incompatible with VGA, which produces an overhead in hardware text modes. No Unicode support in non-NT versions of Windows
# As non-ASCII keyboard layout should be reloaded because of flawed implementation.
#
Kernel mode settingsin recent kernels make this more practical for some video hardware.
Linux framebuffer console
The Linux framebuffer (fbdev) is a graphic hardware-independent abstraction layer, which was originally implemented to allow the Linux kernel to emulate a text console on systems such as the Apple Macintosh that do not have a text-mode display. Now it offers a
kernel space
A modern computer operating system usually uses virtual memory to provide separate address spaces or regions of a single address space, called user space and kernel space. This separation primarily provides memory protection and hardware prote ...
text mode emulation on any platform. Its advantage over (currently unmaintained) SVGATextMode is a reliance and better hardware compatibility. It also permits to overcome all
technical restrictions of VGA text modes.
A Linux framebuffer console differs from a VGA one only in ways of drawing characters. The processing of keyboard events and virtual consoles’ support are exactly the same.
Linux serial port console
The Linux serial console is a console implementation via
serial port
A serial port is a serial communication Interface (computing), interface through which information transfers in or out sequentially one bit at a time. This is in contrast to a parallel port, which communicates multiple bits simultaneously in Pa ...
, enabled by the CONFIG_SERIAL_CONSOLE option in the kernel configuration. It may be used in some
embedded system
An embedded system is a specialized computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is e ...
s, and on
servers, where direct interaction with an
operator
Operator may refer to:
Mathematics
* A symbol indicating a mathematical operation
* Logical operator or logical connective in mathematical logic
* Operator (mathematics), mapping that acts on elements of a space to produce elements of another sp ...
is not expected. The serial console allows the same access to the system as framebuffer mode, but usually at a slower speed due to the limited bandwidth of the
RS-232
In telecommunications, RS-232 or Recommended Standard 232 is a standard introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a ''DTE'' (''data terminal equipment'') such as a compu ...
interface. A serial console is often used during development of software for embedded systems, and is sometimes left accessible via a
debug port
A debug port is a diagnostic interface (akin to a computer port) included in an electronic system or integrated circuit to aid design, fabrication, development, bootstrapping, configuration, debugging, and post-sale in-system programming. In ge ...
.
Control characters
The console responds to a number of
control characters
In computing and telecommunications, a control character or non-printing character (NPC) is a code point in a character set that does not represent a written character or symbol. They are used as in-band signaling to cause effects other than ...
:
For ^
ANSI CSI Mode sequences, and DEC Private Mode sequences.
These extended sequences can control colors, visual effects like blinking, underline, intensity and inverse video, bell tone frequency and duration, VESA screen blanking interval. Aside from the textual blanking, there is no known way to place the VGA adapter into standby.
Future plans
The Kmscon projects aims to create a modern user-space replacement for the Linux console.
Development priorities include support for multi-monitor setups, Unicode font rendering with Pango,
XKB keyboard handling, and
GPU
A graphics processing unit (GPU) is a specialized electronic circuit designed for digital image processing and to accelerate computer graphics, being present either as a discrete video card or embedded on motherboards, mobile phones, personal ...
OpenGL
OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
acceleration.
Complaints about the current kernel implementation include "that it's a user-interface in kernel-space, the code is poorly maintained, handles keyboards badly, produces bad font rendering, misses out on mode-setting and multi-head support, contains no multi-seat awareness, and only has limited hot-plugging handling, limited to
VT102
The VT100 is a video terminal, introduced in August 1978 by Digital Equipment Corporation (DEC). It was one of the first terminals to support ANSI escape codes for cursor control and other tasks, and added a number of extended codes for special ...
compliance."
List of /dev/ entries related to the console
See also
*
Windows Console
Windows Console is a GUI application for running console applications in Windows. Windows Console is used for running text-based programs such as operating system shells (e.g. Command Prompt and PowerShell), utilities (e.g. Far Manager) an ...
References
{{Linux kernel
Computer terminals
Linux kernel
Text user interface