My understanding is that virtual terminals basically serve the same purpose:
ie. A command line environment for
various optional command interpreters
This isn't strictly true. Virtual Terminals are merely programs that send keystrokes and receive output (this is called Standard In, Standard Out[ and Standard Error]) to a process in the background. This is a basic input → processing → output system, and is at the heart of your operating system.
A teletype (or teleprinter)
Man working at a Computer Terminal
Let's see if I can explain it properly:
In a Unix–like system such as Linux there is the concept of "everything is a file". That means, for example, your DVD Drive is a file (/dev/sdb1), your keyboard is a file (/dev/input/keyboard) and so on.
Another set of those magical files are the TTYs, where TTY stands for Teletype. A Typewriter that sends keystrokes to a computer, which in turn sends letters back to the Type Ball. This would have represented a physical device, a remote typewriter, in the same way as /dev/lp0 may represent your printer.
A hardware terminal, the VT100
The Teletype workstations would have been called "Consoles" or "Terminals", a virtual terminal, as opposed to a real one, thus is any application or machinery that provides the same functionality as this workplace arrangement - which is accessing the computer by sending keystrokes to it and receiving output back from it, printing it to a piece of paper. You can imagine that a Modem works in a very similar way.
Terminals, such as the one pictured above, are cheap and simple computers that emulate the functionality of a teletype. When we say terminal emulator these days, we - in turn - usually mean a program that emulates the functionality of such a machine.
There are still terminal based computer systems in use. They are in fact getting ever more popular. In the past, the reason for terminals was that a computer at every desk was completely ridiculous - where computers filled a room and were immensely expensive. Now, it saves money and makes administration easy.
a "thin client" – the modern equivalent of the VT100
I hope that this is helpful. Please alert my if I've made a mistake.
Does that mean that
Control-Alt-F1,F2,etc are also virtual
terminals, and the only difference
between them and "gnome-terminal" /
"konsole" is that they don't have a
GUI?
Yes, basically. The difference between TTY1-7 and gnome-terminal is that the system provides the ttys, whereas gnome-terminal and konsole are themselves running on a tty (which is running the graphical subsystem). This abstraction can be nested even deeper (e.g. x-forwarding, using the telnet protocol to act as a terminal, ...), after all, the human—computer interface acts just like any other file. And can be piped, abstracted and moved about in the same way.
The virtual terminals (the ones you get to with Ctrl Alt F1-9) go back to the roots of Linux. Remember that Linux was originally a command-line only system and designed for multiple users. The idea was that each user could log into a single tty. This would not happen on the same physical machine of course, think of servers that many computer terminals would connect to. Each user would connect using a different computer and the server log them in to a tty.
This has nothing to do with the tty
command which is part of coreutils
. The tty
command is simply a tool that lets you know the name of the terminal you are currently using.
The "terminal" (actually called a "terminal emulator") is simply a GUI program that mimics the old behavior. It lets you run a shell (bash in the default Ubuntu) from within your X session.
The main point is that both the virtual terminals and the terminal emulators provide you with a command line interface, a shell. They are basically the same thing. The only important difference from a practical point of view is that the terminal emulators run interactive, non-login shells while if you drop into a tty and login there, you will run an interactive, login shell. For more information on the differences between these two types of shell, see here.
I suggest you also read this excellent Q&A on Unix & Linux:
What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?.
Best Answer
xterm
andgnome-terminal
are simply two different kinds of "terminal emulators", i.e. they make it look like you are on a real terminal (=text mode linux), but are designed to work in a GUI environment. xterm is the classical X11 terminal, while gnome-terminal is Gnome's default terminal.The difference, apart from visual appeal, is that gnome-terminal has many more features than xterm but also requires you to be running Gnome. There are many more terminals of this kind available: xfce4-terminal, lxde-terminal, etc., with different looks, different feature sets, different dependencies and different "weights" (i.e. how much RAM they consume).
The "virtual terminals" (Ctrl+Alt+F1 to F6) are "real" terminals, not terminal emulators. If your regular desktop (Gnome) is ever in trouble, or you are having problems booting, you can try switching to another virtual terminal so that you can log in and try to fix the problem (in text mode).
This is a real terminal, as larsmans pointed out: