Linux console

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

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 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

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 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-8
223 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

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 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.

List of /dev/ entries related to the console

Name Major Minor Description
/dev/tty1

/dev/tty63
c   4 1

63
virtual consoles
(keyboard controlled)
/dev/vcs1

/dev/vcs63
c   7 1

63
The text (the character pointer table) of a virtual screen
/dev/vcsa1

/dev/vcsa63
c   7 129

191
Full 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


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Linux framebuffer — The Linux framebuffer (fbdev) is a graphic hardware independent abstraction layer to show graphics on a console without relying on system specific libraries such as SVGALib or the heavy overhead of the X Window System.It was originally… …   Wikipedia

  • LINUX —  Pour l’article homonyme, voir Linux (homonymie).  Linux …   Wikipédia en Français

  • Linux's Not UNIX — Linux  Pour l’article homonyme, voir Linux (homonymie).  Linux …   Wikipédia en Français

  • Linux Is Not UNIX — Linux  Pour l’article homonyme, voir Linux (homonymie).  Linux …   Wikipédia en Français

  • Linux x86 64 — Linux  Pour l’article homonyme, voir Linux (homonymie).  Linux …   Wikipédia en Français

  • Linux gaming — refers to playing or developing video games for Linux operating systems. Open source games A few original open source games have obtained notability:* AssaultCube is a first person shooter * Battle for Wesnoth is a turn based strategy game *… …   Wikipedia

  • Linux pour Playstation 2 — est le nom d un kit produit par Sony Computer Entertainment en 2002 pour permettre aux joueurs de la PlayStation 2 d utiliser cette console de jeu comme un PC. Il contient un système d exploitation qui est basé sur Linux, un ensemble clavier… …   Wikipédia en Français

  • Linux kernel — Linux Linux kernel 3.0.0 booting Company / developer Linus Torvalds and thousands …   Wikipedia

  • Linux malware — includes viruses, trojans, worms and other types of malware that affect the Linux operating system. Linux, Unix and other Unix like computer operating systems are generally regarded as very well protected, but not immune, from computer viruses.… …   Wikipedia

  • Linux on zSeries — Linux on System z is the collective term for the Linux operating system compiled to run on IBM mainframes, especially System z machines. Other terms with the same meaning include Linux/390, Linux on zSeries, Linux for zSeries, Linux on System z9 …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”