What's a shell, their importance, types and functions?
There is an important (well...) distinction:
- Terminal: The program you use to gain access to the command line interface
- This would be something like gnome-terminal, it allows the user to type in commands, set the font size and so on. In the early days of UNIX, these were physical machines.
- Shell: The program running atop the command line, like Bash, Dash, Zsh..
- A good shell like bash allows you not just simply to run programs, but to script them, use complex arguments, pipe output from one program to the input of another one and so on.
I've recently written something about the command line in general in the Tag-Wiki for the
The command-line interface (CLI) is a way of interacting with the operating system or software by typing text commands into a Terminal.
"Under Linux there are GUIs (graphical user interfaces), where you can point and click and drag, and hopefully get work done without first reading lots of documentation. The traditional Unix environment is a CLI (command line interface), where you type commands to tell the computer what to do. That is faster and more powerful, but requires finding out what the commands are." from man intro(1)
Some users prefer using the command line for some tasks because it saves them time and effort. They also benefit from being able to create scripts to automate common tasks, and they can use the command line to configure their operating system on a very low level to exactly fit their needs.
- The Ubuntu community documentation has a General introduction to the Command Line.
- There is also a longer, more in-depth Command Line How-To.
If you'd like to learn a bit about it's history and inner workings, people seem to be happy with my answer to question from fred.bear on the subject.
Shell works as interpreter of user commands and translates them into action.
The shell forms the outer part of the operating system and forms the interface between the user and the kernel.
For each user logged in, there is shell in action. When a command is given by the user, it is examined by the shell and communicated to the kernel for execution.
To make it easy to understand, think of the kernel as the snail, and the "shell" as it's shell. You can pick the snail up by the shell, because it is the point of simple, easy, and straightforward access. Similarly on a computer, a shell provides you with simple, straightforward access. Shells can come in different shapes/sizes just like a snail shell. For example, bash is a text-based shell, where as GNOME (as a whole) is a graphical shell, making it easy for most computer users to access the kernel, system libraries, and applications (the snail).
This can be useful: https://help.ubuntu.com/community/UsingTheTerminal