6

We can switch to a text console by pressing Ctrl+Alt+F<1-7> on the keyboard.

What are the uses of these consoles, and why are there multiple consoles?

3
  • Please elaborate, as it is, it's hard to understand what you're asking.
    – dimo414
    Jul 25, 2012 at 20:54
  • 4
    Because it can. Usually 1-6 are used for terminals and 7-12 used for GUI (xwindows).
    – jman
    Jul 25, 2012 at 20:55
  • 1
    They are called virtual consoles Jul 25, 2012 at 21:28

6 Answers 6

7

Why multiple consoles? Because -- oddly enough -- Linux started out as a terminal emulator.

http://en.wikipedia.org/wiki/History_of_Linux#The_creation_of_Linux

As to "why 7"? That's not inherent to the operating system; you can actually have any number of virtual consoles, within reason. It's configurable in /etc/inittab on most distributions.

0
7

Because that's what one did if one was a multi-user operating system on a PC Compatible.

In the world of minicomputers, one had multiple real terminals, usually attached through a terminal concentrator or some such, and multiple users could each have a terminal. In the world of the IBM PC, however, one generally didn't have real terminals at all. It was, after all, a personal computer.

So multi-user operating systems supplied virtual consoles that were displayed on the PC's display adapter, and that one switched between using hot-key combinations. Concurrent CP/M-86, back in 1982, had four virtual-consoles, which one switched between using the keyboard combinations Ctrl+1, Ctrl+2, Ctrl+3, and Ctrl+4.

SCO Xenix in the early 1980s had what was called Multiscreen. As a Linux user, you'll find it very familiar. There were originally 10 virtual terminals, whose character device files were named /dev/tty01 to /dev/tty10. One switched among them using Alt and a function key — Alt+F4 to switch to virtual console number 4, for example. One could also cycle through them in order by pressing Control+PrtSc. With the release of Xenix 5, the number of virtual consoles was increased from 10 to 12, to reflect the existence of the Enhanced PC/AT keyboard with its additional F11 and F12 function keys.

Away from the world of MP/M and Unix, the VMS-like and DOS-like world of PC Compatible operating systems had similar ideas. This was true even for non-multi-user operating systems. OS/2 version 1.0 in 1987, for example, had a Session Manager from which one could start up to 15 sessions, separate virtualized combinations of display output and keyboard/mouse input. One cycled between sessions in order with Alt+Esc and switched back to the Session Manager (from which one could start new sessions or switch to existing sessions from a menu) with Control+Esc.

MS-DOS 5 had dosshell which switched the screen between multiple programs (albeit without multitasking as OS/2 had) and had the familiar Alt+Tab and Alt+Esc. DR-DOS 6 had taskmax where one used Control+Esc to get to the Task Manager and Ctrl+1, Ctrl+2, and so forth to switch directly to the screens of individual tasks, which could be swapped to and from disc or extended/expanded memory (subject to some constraints).

By the time that Linux came around in the 1990s, the idea that what one saw on the (text mode) display and typed in at the keyboard was the virtualized input/output of just one of several sessions/tasks/terminals/consoles, that one could switch amongst with hot keys, was pretty much embedded in people's thinking. It had been around in the PC Compatible world for almost ten years.

As for what use they are, I give you the words of Robin Raskin and Kaare Christian:

Xenix's Multiscreen feature is a boon for those who like to do several things at once. A single keystroke switches the console screen and keyboard from one log-in session to another. It's as if you have several terminals on your desk, but with only one physical screen and keyboard. The applications for this feature quickly become evident. For example, when preparing a table of figures, I used the editor on one screen and a desk calculator program on another, and I previewed the printer output on a third. Switching from one to another was trivial: Alt-F1 pulled up the editor screen, Alt-F2 brought forth the calculator, and Alt-F3 showed me the printer preview. Each screen switch takes just a fraction of a second.
— Robin Raskin and Kaare Christian (August 1986). "Xenix System V: A Multi-User Answer for the AT?". PC Magazine 5(14). ISSN 0888-8507. Ziff Davis, Inc.. pp. 253–266

Nowadays, of course, one can crank up a GUI with multiple terminal emulators and switch amongst them without switching the entire display buffer, and the display adapter barely gets a sniff of operating in its text mode. (Even then, one could do this on Unix workstations, which had graphical frame buffers and the X Window System.) So having multiple virtual consoles seems less of a feature. But to those who came from the world of multi-user computing on minicomputers with only real terminals, where clustering together a group of terminals on one's desk was a power-user thing to do, especially if one hadn't pulled screen from comp.sources.unix (the other power-user thing to do), it definitely was at the time.

Further reading

4

if you run a server (without GUI) instead of a desktop linux os (with GUI), this way you can have multiple terminals open at the same time without using a software like screen to manage multiple terminals.

On a GUI system, this is not very useful but here are a few situations where I use it:

You can use one of the console to log in the system without loading the GUI for example to update or modify the GUI.

If you only need to do something quickly (without waiting GUI full loading) like starting updates on a few machines for example. It is faster to open one of the consoles and use it than to load the gui and open a terminal and log off after completed.

I have used it sometimes to log in a machine (locally without using ssh) while another user was logged using the GUI also (without needing to switch users or opening a terminal on his screen)

1
  • Can you run multiple desktop environments simultaneously, one per virtual console? Oct 6, 2020 at 5:29
1

It lets the user multitask conveniently directly from a keyboard/monitor connected to the system. Nine times out of ten I'm remoted into a system via ssh and can open as many "consoles" as I want, but if you are not working in a networked enivronment it helps. A good example: The Debian installer uses multiple virtual consoles - one has the ncurses-based installer, two more have a shell just in case something goes wrong or you want to run shell commands to look at hardware, etc., and a fourth is used to display status and error output from the installer processes.

GUI systems let you switch between running programs and interact with them. So the user can do things like start a job, place its window in the background, and run additional tasks while conveniently keeping tabs on what is also running.

You can log into one console, run a long running command, and then switch/login to another console and do other stuff. You can go back to the first console to monitor the progress. Alternatively you can log on as different users if you wanted, to test how things work under different accounts or just to not use a root account all the time.

It's also possible to use one of the consoles as just an output device, so you can view logs or reports and not clutter your current console. /etc/inittab controls which tty's or consoles have getty running, which is what provides the login prompt.

0

If you have a long running job, you might want to look at the log file, the error file, the system load, the free work space, the free disk space, how many users are on the system etc etc.

The question becomes: not, why 7 - but why not more...

1
  • Because terminal multiplexers were invented for a reason!
    – Rob
    Jul 26, 2012 at 15:21
0

Traditional Unix systems allowed just one user connected over a (remote) terminal. But users soon looked for ways of "doing several things at once," i.e., being able to run several sessions. OK, you could take over the neigboring terminal too... but that isn't very nice. So programs like screen came to be.

Soon after Linux started, the possibility to have several sessions available was added. No screen yet, and a PC still normally has only one set of keyboard/screen/mouse...

In the end, if it can be done with (relatively) little effort, why not? It is very convenient (OK, today I'm happy to have a dozen terminals open under X, but in the olden days there was no X).

You must log in to answer this question.