Physical and virtual consoles

The display adapter, the screen, and the system keyboard are collectively referred to as the physical console, which is controlled by a console driver.

Note: Some systems don't include a console driver. For example, embedded systems might include only a serial driver (devc-ser*). The devc-con and devc-con-hid drivers are currently supported only on x86 platforms.

To let you interact with several applications at once, Neutrino permits multiple sessions to be run concurrently by means of virtual consoles. These virtual consoles are usually named /dev/con1, /dev/con2, etc.

When the system starts devc-con or devc-con-hid, it can specify how many virtual consoles to enable by specifying the -n. In a desktop system, the buildfile specifies four consoles when it starts diskboot. For more information, see the description of diskboot in the Controlling How Neutrino Starts chapter. The maximum number of virtual consoles is nine.

The root user can also specify the program, if any, that's initially launched on each console. The terminal-initialization utility (tinit) reads /etc/config/ttys to determine what to launch on the consoles. By default, tinit launches a login command on the first console only, but tinit is "armed" to launch a login on any other console on which you press a key. This means that while console 1 is always available, the other consoles aren't used unless you specifically switch to one of them and press a key.

Note: If you increase the number of consoles on your machine, make sure you edit /etc/config/ttys so that tinit will know what to start on the additional consoles.

Each virtual console can be running a different foreground application that uses the entire screen. The keyboard is attached to the virtual console that's currently visible. You can switch from one virtual console to another, and thus from one application to another, by entering these keychords:

If you want to go to the: Press:
Next active console CtrlAltEnter or CtrlAlt+
Previous active console CtrlAlt
Note: Use the + (plus) and (minus) keys in the numeric keypad for these keychords.

You can also jump to a specific console by typing CtrlAltn, where n is a digit that represents the console number of the virtual console. For instance, to go to /dev/con2 (if available), press CtrlAlt2.

When you terminate the session by typing logout or exit, or by pressing CtrlD, the console is once again idle. It doesn't appear when you use any of the cyclical console-switching keychords. The exception is console 1, where the system usually restarts login.

For more information about the console, see devc-con and devc-con-hid in the Utilities Reference, and "Console devices" in the Character I/O chapter of the System Architecture guide.