Virtual console

From Wikipedia, the free encyclopedia

Jump to: navigation, search
First virtual console showing Knoppix boot messages
First virtual console showing Knoppix boot messages

In some operating systems such as UnixWare, Linux and BSD, a virtual console (VC, sometimes virtual terminal, VT) is a conceptual combination of the keyboard and the display for a user interface. The concrete combination is the system console of the computer, where the user can switch between the virtual consoles to access multiple unrelated user interfaces. Usually in Linux, the first six virtual consoles provide a text terminal with a login prompt to a unix shell. The graphical X Window System starts in the seventh virtual console.

In Linux, the switching is performed with a key combination of Alt plus a function key -- for example Alt+F1 to access the virtual console number 1. Alt+Left arrow changes to the previous virtual console and Alt+Right arrow to the next virtual console. To switch from the X Window System, Ctrl+Alt+function key works. These are the default key combinations, as they can be redefined.

The need for virtual consoles has lessened now that most applications work in the graphical framework of the X Window System, where each program has a window and the text mode programs can be run in terminal emulator windows. Several X sessions might be desired though, such as in the case of fast user switching or when debugging X programs from another X server, and in those cases each X session runs in a separate virtual console. GNU Screen is a program that can change between several text-mode programs in one textual login. There are also other graphical frameworks such as FrameBuffer UI, Y Window System, and Fresco.

Contents

The virtual consoles are represented by device special files /dev/tty1, /dev/tty2 etc. There are also special files /dev/console, /dev/tty and /dev/tty0. The virtual consoles can be configured in the file /etc/inittab read by init -- typically it starts the text mode login process getty for several virtual consoles. X Window System can be configured in /etc/inittab or by an X display manager.

The programs used to access the virtual consoles typically include chvt to switch the current virtual console, openvt to run a program on a new virtual console, and deallocvt to close a currently unused virtual console. The program startx starts the X Window System on a new virtual console. There are also other graphical programs that can start from the console, such as LinuxTV and MPlayer.

Programs can access the virtual consoles by the device special files. In text mode, writing to the file displays text on the virtual console and reading from the file returns text the user writes to the virtual console. As with other text terminals, there are also special escape sequences, control characters and termios functions that a program can use, most easily via a library such as ncurses. For more complex operations, the programs can use console and terminal special ioctl system calls. Graphical programs can use libraries such as DirectFB, DRI, SDL or the earlier SVGALib.

Unix workstations, like these manufactured by Sun or Silicon Graphics, did not include virtual consoles. The only purpose of console would be fixing the system so that graphical environment could start.

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.