What's the difference between gnome, bash, zshell, and cli?

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
I've been using Linux for a while but I'm just figuring out exactly what a shell is. Please correct me if I'm wrong (I probably am):

A shell is simply a way for a user to type commands on the keyboard and have the OS do those commands. A shell can either be a GUI or a CLI.

In ElementaryOS, Pantheon is the graphical shell while Terminal is the command line shell.

In Ubuntu, GNOME is the graphical shell (I dunno what Ubuntu's command line shell is called).

Zshell and Bash are simply different shells that you can use in place of the default Terminal shell in ElementaryOS.

Does this sound about right?
 

mv2devnull

Golden Member
Apr 13, 2010
1,519
154
106
A shell is simply a way for a user to type commands on the keyboard and have the OS do those commands. A shell can either be a GUI or a CLI.
Typing commands implies CLI.
Not typing is clickety clack GUI crap. (IMHO, YMMV)

sh, csh, tcsh, ksh, zsh, bash, cmd.exe are CLI shells. Shells support some script language.

A "terminal" is a program that provides a window where you can interact with CLI application(s) (a shell, by default). Terminals used to be physical (screen + keyboard); the current apps inherited the name. Terminal is not a shell, it is a view to a shell. There are multiple terminal programs with more or less GUI crap^H^H "features". The shell that a terminal executes is the default shell of your user account.


Windowing system, Window manager, Desktop manager, GUI shell, File manager, ... There have been and are many different, some more modular, interchangeable, synonymous, simply not compatible, "rich in features", "light", infuriating, ...


I do use sh.exe shell in rxvt terminal in MS Windows and execute other GNU command line tools ...
 

Gryz

Golden Member
Aug 28, 2010
1,551
204
106
- A shell is a simple program that executes commands for you. It reads the letters you type at the keyboard, and responds with a bunch of letters back to you, showing you the information you asked for. Or showing you confirmation that the program you started did what it was supposed to do. Everything is character based (letters and numbers). /bin/sh, /bin/bash, /usr/bin/tcsh are all examples of shells. In Windows you could call "command.com" also a kind of shell.

A Command Line Interface is a user interface that is completely character based. Shells are CLIs. Command.com is a CLI. But also other equipment can have CLIs. Networking equipment often have CLIs. Old DOS is a CLI.

Note that it is not really "the OS" that does all the work. It's the programs. If you type "ls", there is actually a program (called ls, living in /bin/ls") that does the work. The shell itself is also a program.

- Shells were used with terminals. In the 70s and 80s there were no nice big color-monitors. People used "terminals". Simple devices with a keyboard. And a screen that could display only letters and numbers.
http://www.catonmat.net/images/why-vim-uses-hjkl/lsi-adm-3a.jpg
This is a picture of an ADM-3A terminal. It's not a computer. It can not run programs, it can not compute anything. It can just take keystrokes as input, relay those to a computer (e.g. a mainframe, or a multi-user "mini-computer"), and dosplay the characters it gets as result.
TTY stands for TeleType. TTY is a terminal. The abbreviation tty is still used in Unix/Linux today.

- In the nineties, graphical user interfaces were introduced. Aka GUI. Some people would call it a "graphical shell". But it has nothing to do with the old concept of Unix shells (see above). Don't call it "graphical shell". Call it a GUI.

GUIs consist of multiple components. a) First there is the software that displays stuff on screen. In Unix, this is usually the X-Server. b) Secondly there are a lot of applications that want to show something on the screen. They can do this in a "window". Each application has full control over what is displayed inside its own window. c) There is a window manager. The window manager draws the title-bars above each window. It allows you to move windows on the screen. It displays menus when you click a mouse-button, etc.

X-Windows is a GUI.

- A Desktop Environment is an extended GUI. It does not only have an X-Server, graphical applications and a window manager, it would have a little more. Start-menu button, a configuration tool, a desktop (with icons), etc. To make all the elements look like one entity. Apple and Windows started with that. They integrated everything, made all elements look the same, forbid alternative elements, make it easier for the simple users.

GNOME, KDE, and I guess Pantheon, are all Desktop Environments. In Windows and MaOS it is much harder to distinguish between the GUI and the Desktop Environment, there they are kinda the same thing.

- In a GUI, you often still want to use a shell. But shells can only display characters. They can't draw on a GUI. So what you need is a program that emulate a terminal, on the screen of a GUI ! Xterm is such an emulator. I assume "Terminal" is also such a terminal-emulator.

When you type a character, the OS gives it to X-Windows, X-Windows gives it to the terminal-emulator (Terminal, or xterm). Xterm then gives those characters you types to the shell. The shell starts a program. If you keep typing, the characters go from keyboard->X-Windows->Xterm->program. And back. The characters that are produced by programs, or by the shell, are given to xterm, which sends it to X-Windows, which shows the characters on screen.

Does this make it a little more clear ?
 
Last edited:

LoCaNto

Junior Member
May 25, 2015
7
0
0
gnome - a desktop environment. Not a shell,
bash - the most common default shell.
zshell - another type of shell
cli - the type of a user interface. You write commands in the shell and get the results in real time,,

More info.