Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
What are the differences between shell , console & terminal?

This probably sounds like a stupid question but I'm having a lot of trouble clearly differentiating between a shell (such as Bourne or bash) and the Terminal application in GNOME. I realise that both are completely different but I can't seem to find a clear answer written in text. Could anyone clearly distinguish between both?

share|improve this question

marked as duplicate by Dennis Williamson, Ivo Flipse Jan 10 '11 at 10:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4 Answers 4

up vote 11 down vote accepted

The terminal program is just a graphical interface to the shell. The shell is what actually handles commands and so forth; the terminal program just gives it a way to interact with the graphical environment.

share|improve this answer

The shell is a typical Unix program. It reads commands from the standard input and prints something on the standard output. This is simple and good.

The points is: In a graphical environment (like GNOME or KDE) a program cannot just write text directly on the desktop. If the programs could, this would quickly become a mess and chaos. Therefore you need a program that provides a space where other programs can write their text. That program also accepts keystrokes from the user and converts them into byte sequences, since this is what many programs (command-line, text based, not GUI) expect. All this is the job of the GNOME Terminal application.

So you have the shell (probably bash), and wrapped around it is the GNOME terminal. To see what exactly the GNOME terminal does you can run (Alt+F2) gnome-terminal, xterm and rxvt in between and see where they are different and what they have in common.

share|improve this answer

I think what you are really asking is what is the difference between the console and a terminal application like xterm?

If so, the console is local to the machine, there can only be one console. The output of the console is directed to /dev/console which usually means your monitor. A terminal, on the other hand, is really a terminal emulator which harkens back to the days when mainframes were as big as entire rooms and you had users interact with dumb terminals that were remote to the mainframe. The terminals would send terminal commands over a serial line to the mainframe to interact with it. Now a days, we still use terminals, but they are emulated so we can use more than one (each tied to a pseudo tty like /dev/pts#) and we can even use them remotely and forwarded their connection over an encrypted SSH channel along the internet.

Both the console and a terminal application invoke your shell(s) upon login.

share|improve this answer

The Terminal is essentially an emulated shell in a window.

If you want to see a real shell sans Terminal, hit Ctrl+Alt+F1 and Ctrl+Alt+F8 to go back to the graphical interface.

share|improve this answer
    
A terminal is not any sort of a shell. –  Ignacio Vazquez-Abrams Jan 9 '11 at 17:28
    
@Dennis Care to elaborate? –  digitxp Jan 9 '11 at 21:36
    
See Ignacio's comment. A terminal, whether it's a system console or gnome-terminal, xterm or PuTTY is more akin to a physical terminal (and is thus an emulator ). A shell is a piece of software that, among other things, accepts input, does processing, and outputs on a terminal. –  Dennis Williamson Jan 10 '11 at 0:43
    
@Dennis So I should word it "The terminal essentially contains an emulated shell within a graphical window."? –  digitxp Jan 10 '11 at 3:48
    
A terminal is not necessarily a graphical window and a shell isn't necessarily running in it. And the shell isn't emulated (it could be some other program). What you're asking is essentially the same as your original. See the answer here which is very close to being complete and is fairly precise. –  Dennis Williamson Jan 10 '11 at 7:05

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