2

I know about Linux terminal. I can also issue many advanced commands over terminal. But one simple concept is not clear to me.

What is terminal and how does it work?

I know about hardware which consists of CPU, RAM, HARD DISK and so on.

I know about kernel which is basically the core of the operating system.

I know about software which sits on the top of kernel.

And I know about users.

And I know that user uses either terminal or GUI to give instructions to the software.(or kernel?)

Now please explain these concepts of terminal and shell.

Graphical explanation and simple non-technical words are preferable.

marked as duplicate by Thomas Dickey, jimmij, Archemar, Stéphane Chazelas linux Jun 11 '16 at 22:16

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.

3

What is shell?

In simple words, shell is a software which takes the command from your keyboard and passes it to the OS.

So are konsole, xterm or gnome-terminals shells?

No, they're called terminal emulators. They open a GUI to interact with the shell. You can think of them as a frontend to the shells.

shell reference

Different Shells

There are different shells which are more or less same but the features and syntaxes are different.

Bourne shell The most basic shell available on all UNIX systems

Korn Shell Based on the Bourne shell with enhancements

C Shell Similar to the C programming language in syntax

Bash Shell Bourne Again Shell combines the advantages of the Korn Shell and the C Shell. The default on most Linux distributions.

tcsh Similar to the C Shell

  • But where is terminal in your diagram? What do you mean by "frontend to the shells " – rancho Jun 11 '16 at 16:38
  • Terminals are just the text input/output environment. And "Frontend to the shells" means they lie between the user and the shellls to provide a GUI environment. – Aniket Bhattacharyea Jun 11 '16 at 16:47
  • Then terminal should also lie between user and shells to provide a CLI enviroment? – rancho Jun 11 '16 at 16:49
  • No they don't lie between users and shells. They lie between kernel and Applications. Terminal is basically a peripheral device to interact with the machine. The shells are just softwares which are being run in a terminal. Even the GUI in the machine runs in a terminal. – Aniket Bhattacharyea Jun 11 '16 at 17:02
  • 1
    No, the shell is not the low-lying software on top of which other software runs: that is the kernel. The kernel interacts or permits interaction with the hardware. The peripherals are hardware devices that interface the computer with other things. A terminal is a peripheral that interfaces with a human, it is composed of output and input, of a screen and a keyboard. The GUI shows you a virtual terminal. The shell is the command-line interface software that is usually what a terminal is running. – Law29 Jun 11 '16 at 17:44
1

The shell is the program that runs in the terminal, that reads the commands you type and executes them.

Unix and Unix-like operating systems today offer a choice between mostly the same set of shells, because these shells pre-date most of those operating systems.

For further reading I recommend Evolution of shells in Linux (IBM)

Edit to add information regarding shells and terminals following comments on another answer:

A terminal is a hardware peripheral that interfaces with a human, it is composed of output to the user and input from the user, in other words of a screen and a keyboard, see link. What the GUI shows you is a virtual terminal. The shell is the command-line interface software that is usually what you see on a terminal, but it doesn't have to be a shell. You could start up a virtual terminal and tell it to run vi directly, for example, no shell involved.

  • 1
    Also find out what is Linux: it is just a kernel. It is not the operating system, though often (most of the time), people use this word to refer to some operating systems that (sometimes) use this kernel. This leads to a lot of ambiguity and confusion. ((Android uses the linux kernel, but is not like debian, ubuntu, suse, redhat, slackware, etc. debian can use other kernels, and cygwin that is also like these runs on Microsoft's windows.)) – ctrl-alt-delor Jun 11 '16 at 19:46

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