GNU/Linux Desktop Survival Guide
by Graham Williams
There are six terminals enabled by default in Debian. This means that when you boot the machine you will have one terminal where you see the boot messages and eventually the login prompt (unless you are using a window-based login such as gdm). This terminal is controlled as the device /dev/tty1. By default there are five others: /dev/tty2.../dev/tty6. The entries in the initialisation table responsible for running the appropriate application to control each of these terminals are:
# Format: # <id>:<runlevels>:<action>:<process> 1:2345:respawn:/sbin/getty 38400 tty1 2:23:respawn:/sbin/getty 38400 tty2 3:23:respawn:/sbin/getty 38400 tty3 4:23:respawn:/sbin/getty 38400 tty4 5:23:respawn:/sbin/getty 38400 tty5 6:23:respawn:/sbin/getty 38400 tty6
We can see that only the terminal on tty1 is initiated for all user run levels (2, 3, 4, and 5). The others are initiated only for run levels 2 and 3.
To get more than the default six terminals add additional getty entries and inform the init daemon with:
# telinit q
A total of 256 terminals are available with a default kernel. There are 64 virtual consoles available. More terminals can be provided for in the kernel by recompiling the kernel with different options.
Note that exporting a serial console is in the default init script. This is particularly handy for Palms and similar handheld computers as a system rescue option.
You can move to any of the consoles using left Alt-F1 to left Alt-F6 or left Ctl-Alt-F1 to left Ctl-Alt F6. You can also move between the consoles with Alt-Left and Alt-Right. If you have more that 12 virtual consoles (hence you run out of function keys for Ctl-Alt) you can access them directly with Alt-F1 (for console 13) etc.
If you are running one of the X Window System display managers (i.e., you are presented with a graphical log on screen) such as gdm then this is usually running on virtual terminal 7 which you can access with Alt-F7. Note that X captures the Alt key so you will need to use Ctl-Alt-F1 to switch to virtual console 1.
Copyright © 1995-2020 Togaware Pty Ltd