Terminal Vs. Shell

14

4

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?

Nicklas Olsen

Posted 2011-01-09T17:06:10.487

Reputation: 143

Question was closed 2011-01-10T10:32:43.370

Answers

15

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.

user55325

Posted 2011-01-09T17:06:10.487

Reputation: 4 693

8

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.

Roland Illig

Posted 2011-01-09T17:06:10.487

Reputation: 260

1

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.

SiegeX

Posted 2011-01-09T17:06:10.487

Reputation: 1 911

-2

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.

digitxp

Posted 2011-01-09T17:06:10.487

Reputation: 13 502

Please delete this false information. – Koray Tugay – 2015-06-10T19:17:48.517

A terminal is not any sort of a shell. – Ignacio Vazquez-Abrams – 2011-01-09T17:28:15.913

@Dennis Care to elaborate? – digitxp – 2011-01-09T21:36:16.530

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.

– Paused until further notice. – 2011-01-10T00:43:21.940

@Dennis So I should word it "The terminal essentially contains an emulated shell within a graphical window."? – digitxp – 2011-01-10T03:48:36.327

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.

– Paused until further notice. – 2011-01-10T07:05:33.427