- Linux console
-
The Linux console is a system console support in the Linux kernel. The Linux console was the first functionality of the kernel, developed as early as in 1991 (see history of Linux). On PC architecture, it is common to use VGA-compatible video hardware. Implementations of computer graphics on Linux are excluded from the scope of this article. Linux console, like pure text mode, uses monospace fonts.
Contents
Purpose
The Linux console is intended to run usual text user interface applications, and also to show some kernel messages (considered as urgent or important).
VGA/keyboard implementation of the console
See also: VGA compatible text modeFont, 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 points and character attributes. Code points in the text buffer and font are generally not the same as encoding used in text terminal semantics to put characters on the screen. The set of glyphs on the screen is determined by the current font. The text screen is handled by console.c and consolemap.c drivers. There is a utility for altering fonts and terminal encodings called consolechars.
The Linux kernel (keyboard.c driver) has almost complete support for keyboard input (keyboard layouts), but it remains a bit inconsistent because it interacts badly with different character sets. Layouts are loaded by the loadkeys utility.
These two utilities and corresponding data files are packed in Linux Console Tools http://lct.sourceforge.net/ shipped with many Linux distributions.
Efforts on the internationalization of Linux at the kernel level started as early as in 1994 by Markus Kuhn and Andries Brouwer.
Virtual consoles
Main article: Virtual consoleVirtual 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 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, SVGAlib and X servers.
Currently, there is no support for different modes on different virtual consoles.
Comparison to Windows and DOS
Microsoft Windows (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.
Feature Linux Windows DOS VGA text attributes Yes Yes Yes Custom fonts Possible Possible Possible Character set 512 glyphs max. (on VGA text),
any code page or UTF-8223 or 256 characters (depends on access method), any code page, no Unicode * Run-time character set switching Possible ** Impossible * depends on PoV Terminal emulation Yes, ANSI-compatible
(TERM=linux)No Yes, ANSI
(with ANSI.SYS)Run-time switching between text mode and GUI technically possible, but usually impractical Possible application dependent Run-time changing numbers of rows and columns Possible Possible application dependent Switching between applications Possible Possible Limited
(some TSRs may be activated)Non-standard modes Possible Impossible Possible Mouse support Yes
(with gpm or so)application dependent system and application dependent * – as for Windows 9x. Windows NT based systems 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.
** – a non-ASCII keyboard layout should be reloaded because of flawed implementation.Linux framebuffer
Main article: Linux framebufferThe 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 text mode emulation on any platform. Its advantage over (currently unmaintained) SVGATextMode is a reliance and better hardware compatibility. It also permits to overpass 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.
Unusual implementations
Linux serial console is a console implementation via serial port. It may be used in some embedded systems, and on servers, where a direct interaction with operator is not expected. The serial console allows the same mode of access for the system, but usually at a slower speed due to the small bandwidth of RS-232.
There is also a console implementation via Bluetooth.
Name Major Minor Description /dev/tty1
…
/dev/tty63c 4 1
…
63virtual consoles
(keyboard controlled)/dev/vcs1
…
/dev/vcs63c 7 1
…
63The text (the character pointer table) of a virtual screen /dev/vcsa1
…
/dev/vcsa63c 7 129
…
191Full image of a virtual text buffer; first 4 bytes contain numbers of rows, columns and cursor position /dev/ttyS0
…c 4 64
…Serial ports, suitable for system console /dev/tty0 c 4 0 “current console” See also
Linux operating system Linux Adoption (Adopters) · Criticism (of desktop Linux) · History · Kernel (kernel names · supported architectures) · Linus' Law · Linux Foundation · Linux-libre · Tux · vmlinuxDistribution GNU Free Software Foundation · GNU · GNU GPL · GNU/Linux naming controversy · GNU packages · GNU ProjectWindow manager User interface Applications People Media Lists System arrangement
and featuresMobile Access Linux Platform · Android · Ångström · bada · LiMo Foundation · LiMo Platform · Linux Phone Standards Forum · MeeGo (Maemo · Moblin) · Mobilinux · Open Handset Alliance · Openmoko · OPhone · webOS · SHR · Ubuntu MobileOther topics Linux conference · Linux Documentation Project · Malware · Linux Standard Base · Linux User Group (LUG) · Revolution OS · SCO and Linux · Tanenbaum–Torvalds debate · The CodeCategories:
Wikimedia Foundation. 2010.