Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I hope the question is self-explanatory.

My understanding is that gnome-terminal and konsole are virtual terminals, and they are basically serving the same purpose, i.e. a command line environment for various optional command interpreters. (I'm not even sure if that's the right way to look at it.)

I assume that the real terminal is where I am teleported to occasionaly by mis-keying Ctrl+Alt+F1,F2, etc.

But "There be Dragons" in that black-screen hinterland, so I'm outta-there as quickly as I can press Ctrl+Alt+F7 (I learnt that somewhere: "When all is black and dark: press the secret keys to return :)

  • Is/are the "real" terminal(s) the one(s) that exist behind the Ctrl+Alt+F1,F2, etc. keys?
  • And what is so "real" about them vs the "virtual" ones?
  • And how to they differ? Is it as simple as "no GUI" vs "GUI"?

P.S. are "console" and "terminal" synonymous?

share|improve this question
6  
Do not fear the command line. It can make your life at lot easier for some things once you're more familiar with it. –  Larry Coleman Nov 22 '10 at 1:14
    
Related: superuser.com/questions/96628/… –  Matthew Nov 22 '10 at 1:20
2  
@Larry: Emboldened by your words, I ventured into the dragon's lair (Ctrl+Alt+F1), and I actually logged in this time!... There was silence.. but I could see my customized terminal prompt (from the land of X).. Interesting I thought, and felt brave enoght to call out the the beast: I said "echo $TERM"... and lo and behold! it spoke back to me! It said, "linux"... Immediately I realized that he is a cousin of "gnome-terminal" and "konsole" who reply "xterm".. So it's not a dragon after all, but rather, it is a virtual terminal emulating a linux (real) terminal. –  Peter.O Nov 22 '10 at 4:00

3 Answers 3

up vote 71 down vote accepted

basically serving the same purpose: ie. A command line environment for various optional command interpreters

This isn't strictly true. Virtualy Terminals are merely programs that send keystrokes and recieve output (this is called Standard In, Standard Out[ and Standard Error]) to a process in the background. This is a basic inputprocessingoutput 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 terminal emulator, 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.

Terminal Emulators, 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.

share|improve this answer
9  
Was your answer helpful? ...Absolutely!! ...very well explained... I'd never thought of a keyboard as a file, but it makes sense (a read-only file)... and a "thin client" is a term I had heard touted about on some podcasts, but it just went over my head and I thought it referred to some new CPU architecture (a-la RISC) .. but it actually means that good ideas don't go away, and that CICS (or at least its offspring) is still alive and well... very interesting... Thanks (now I've got a bit more reading to do ... you've started something :) –  Peter.O Nov 21 '10 at 14:42
10  
This is a bit random and hasn't got a lot to do with Linux, but none the less: If you'd like to learn some of the very basics of how a computer actually works, have a listen to twit.tv/sn - episodes 233, 235, 237, 239 and 241. A series on "how computers work from the absolute basics", where basic means "low level". Not a lot of people know this stuff, it's great fun. –  Stefano Palazzo Nov 21 '10 at 15:06
1  
@TokiTahmid whoops! Corrected, Thank you very much. It wasn't intentional, just a mistake :) –  Stefano Palazzo Feb 23 '11 at 17:34
1  
Excellent answer! –  César Feb 14 '12 at 5:04
2  
My recollection is that the VT-100 was considered a (video) terminal, not a virtual terminal or terminal emulator. Many devices containing their own microprocessors were considered terminals, whatever other devices they emulated, as long as they were designed to provide input and output directly to a user. If the computer/human interface is implemented in software on a device that is not dedicated to being a terminal, I would term that interface or software a virtual terminal. The purpose of the overall device is the difference, not the technology nor the communications protocol used. –  John S Gruber Jun 1 '12 at 17:13

In addition to the answers above, see this comprehensive explanation ot terminals. The TTY, despite its apparent simplicity, is conceptually a rather complicated part of Linux.

share|improve this answer
1  
Thanks loevborg. It is a really interesting article which goes a long way to explain a lot of the "mysterious" terminology... (eg. a "zombie" process ;) –  Peter.O Dec 7 '10 at 23:25

Pretty sure calling it a "virtual terminal" is a throwback to when there were physical terminals connected to unix servers...

share|improve this answer
    
Okay... That makes sense... "back then" before multi-tasking existed, and the very idea of it was abstract and "virtual"... So it is the same idea as a Virtual Machine vs a hardware "box". –  Peter.O Nov 21 '10 at 12:40
2  
Does that means 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? –  Peter.O Nov 21 '10 at 12:47
    
@fred.bear: Take a look at Wikipedia. –  Jamie Schembri Nov 21 '10 at 13:16
    
virtual because the human input/output end of the terminal actually connects to a running process (through /dev/pts/*). Non-virtual terminals are things like the Linux text console (backend provided by kernel code to turn keystrokes into terminal input characters, and terminal output into characters on screen, including processing escape codes for color, cursor movement etc.). Or the oldest example of a non-virtual terminal, the serial ports. Terminal handling provided by whatever you hooked up to your serial port. You can boot with the text console on a serial port. –  Peter Cordes Aug 5 at 7:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.