Timeline for What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?
Current License: CC BY-SA 4.0
49 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 9, 2023 at 22:10 | history | edited | Matthias Braun | CC BY-SA 4.0 |
fix links and make them HTTPS, small changes to spelling
|
Feb 16, 2023 at 7:11 | review | Suggested edits | |||
Feb 16, 2023 at 7:28 | |||||
Jul 23, 2022 at 22:11 | comment | added | Gilles 'SO- stop being evil' | @IlyaLoskutov The line discipline is very very primitive (it only supports insert-character, enter, and deleting from the end of the line). Shells that people actually use interactively put the terminal in raw mode and have their own line editor. | |
Jul 23, 2022 at 19:05 | comment | added | Ilya Loskutov | the terminal converts keys into control sequences ... The shell converts control sequences into commands Is not it all charge of the line discipline? In this regard (user's I/O), what's the separation of concerns btween line discipline and shell? | |
Dec 11, 2019 at 21:26 | comment | added | dotbit | while a shell is often CLI , it can be GUI also, as in KDE plasmashell and liquidshell . The above definitions are not 100% accurate. | |
Jul 30, 2019 at 5:33 | comment | added | Shuzheng | @Gilles, so the shell just executed the command (program) and connects its stdin/stdout/stderr to the terminal? Is this accomplished using /dev/tty? | |
Jul 29, 2019 at 20:37 | comment | added | Gilles 'SO- stop being evil' | @Shuzheng The shell is not involved in displaying the output of another command. Each program that displays on a terminal talks directly to the terminal. While this is happening, the shell sits there and waits for the command to finish. By inter-application copy-paste, I mean when you copy text in one application and it's visible to other applications, as opposed to copy-paste mechanisms that may exists inside one application. | |
Jul 29, 2019 at 20:31 | comment | added | Shuzheng | Does the shell also emit an instruction to display command output? What do you mean by inter-application? | |
Jul 24, 2019 at 10:15 | comment | added | darklord | Generally speaking tty is just a kind of terminal device, but in unix tty is the only terminal device, is that right? | |
Nov 29, 2017 at 12:25 | comment | added | Gilles 'SO- stop being evil' | @PrashanD Yes, Explorer is a graphical shell. But in the Unix world, “shell” usually means “command line shell”. There is a Unix graphical shell called Gnome Shell, but other than that the terminology hasn't really caught on. | |
Nov 29, 2017 at 8:44 | comment | added | PrashanD | I would argue that explorer.exe is a shell for Windows as much as it's a window manager or a desktop environment. It is one of the three shells in Windows, the other two being cmd.exe (Command Prompt) and powershell.exe (Windows PowerShell) | |
S Nov 16, 2017 at 14:06 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |
changed "line edition" to "line editing"
|
S Nov 16, 2017 at 14:06 | history | suggested | kevinAlbs | CC BY-SA 3.0 |
changed "line edition" to "line editing"
|
Nov 16, 2017 at 13:55 | review | Suggested edits | |||
S Nov 16, 2017 at 14:06 | |||||
Oct 23, 2017 at 7:27 | review | Suggested edits | |||
Oct 23, 2017 at 8:35 | |||||
Apr 13, 2017 at 12:22 | history | edited | CommunityBot |
replaced http://askubuntu.com/ with https://askubuntu.com/
|
|
Mar 29, 2017 at 17:24 | comment | added | Gilles 'SO- stop being evil' | @confused00 The prompt is of course displayed by the terminal, but all it does is interpret the order to display characters at a certain position in a certain color. The terminal doesn't know “this is a prompt”, “this is command output”, etc., it only knows “I've been asked to display this”. | |
Mar 29, 2017 at 15:11 | comment | added | confused00 | "The prompt is purely a shell concept." This confuses me a bit: is the terminal not responsible for displaying the prompt? | |
Mar 15, 2017 at 17:45 | comment | added | Alex W | I think the term "shell" came from the metaphor that it is an outer layer or interface to the inner kernel. | |
Jan 21, 2016 at 19:00 | comment | added | Rhialto supports Monica | Originally, a console (the piece of furniture) was placed near the computer with lots of buttons and lights and switches to control the computer. When terminals were introduced, (the only) one was logically placed on/built into the console. Then the other parts of the console became fewer and fewer, and in the end only the terminal was left. Hence the console terminal (the terminal in/on the console) became synonymous with the console. | |
Sep 25, 2015 at 18:27 | comment | added | labyrinth | Great answer. But what is the difference between a virtual terminal and a pseudo-terminal? | |
Aug 7, 2015 at 5:28 | comment | added | G-Man Says 'Reinstate Monica' | @Gilles: FYI, see this. | |
May 26, 2015 at 15:30 | history | rollback | Gilles 'SO- stop being evil' |
Rollback to Revision 5
|
|
May 26, 2015 at 15:29 | history | edited | PersianGulf | CC BY-SA 3.0 |
added 40 characters in body
|
Jan 25, 2015 at 1:48 | comment | added | umeboshi | @Gilles, I have way to look at shell. Long ago, we have master control program (MCP). MCP is responsible for loading program into memory and xferring control to program. MCP is big C prgm with mainloop that accepts keybrd input to call functions in MCP. The function called is first word entered and args are remaining words. MCP has lot of little functions to help with managing files and stuff. Funcs need fix/update. We already have .o files that we link together. Relinking MCP freqly, no good. Put file loader & path search funcs in MCP. Take other funcs out & put it path. Shell remains. | |
Jul 1, 2014 at 21:01 | comment | added | hobs | @Gilles, thanks. I didn't realize that task bars were considered to be shells on Windows/Mac and perhaps on Linux/Unix window managers. | |
Jul 1, 2014 at 20:54 | comment | added | Gilles 'SO- stop being evil' | @hobs In general, a shell can be any type of front-end program that allows users to run other programs. In the unix world, it's specialized to command line shells, but elsewhere, there are other types of programs that are called shells, such as GUI shells like Windows's task bar. | |
Jul 1, 2014 at 20:46 | comment | added | hobs | @Gilles the "shell" in "PowerShell" is indeed referring to a type of program, because that's what it is. And GUI window-managers for linux do use the word "shell" to describe a type of program that inhabits terminals within some windows... I must be missing something about the usage of the word "shell" that you're intending to inform us of in that quoted statement... If you're just saying that windows and GUIs aren't shells then I agree. That's like asserting that roads aren't the same as cars. If you're saying something more, like, metaphorically, roadsigns never mention cars, I don't agree. | |
Jul 1, 2014 at 18:07 | comment | added | Gilles 'SO- stop being evil' | @hobs By “other types of environment”, I meant window-based GUIs as opposed to CLI. The whole paragraph is about unix. Windows does use the word “shell” for its GUI shell, which is Explorer by default (Windows also uses the word “shell” in the name “Powershell”, but not much as a type of program). | |
Jul 1, 2014 at 17:07 | comment | added | hobs | minor quibble with "Other types of environments don't use the word “shell”". Modern window systems do use the word "shell" and even have simplified "equivalents" of unix shells: e.g. powershell in Windows>=XP, and bash in Mac>=OSX | |
Feb 23, 2014 at 19:04 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |
Relate answer more to bash, sh etc
|
Feb 23, 2014 at 18:55 | review | Suggested edits | |||
Feb 23, 2014 at 18:58 | |||||
Feb 23, 2014 at 18:46 | review | Suggested edits | |||
Feb 23, 2014 at 19:04 | |||||
Jun 13, 2013 at 23:07 | comment | added | Baard Kopperud | "The console" is actually the terminal (keyboard+screen-combo, though originally a teletypewriter) directly connected to the actual computer. It was usually in the (locked) computer-room, and only a few had access. It was also the only terminal working in single-user mode. All other users, used terminals connected by serial-lines. These days with PCs; "the console" is your PC's keyboard & screen, and you'll do most of your work on it directly. | |
Feb 13, 2013 at 22:59 | comment | added | vonbrand |
A quibble: The tty driver (through its cooked mode, more space for endless quips :) handles line editing (i.e., if I write something and erase it by backspacing, this is done by the tty. That is, unless readline or some such newfangled stuff handles it, with the tty in raw mode). The shell receives the line only after I press ENTER.
|
|
Sep 2, 2012 at 22:21 | comment | added | Born2Smile | The shell is indeed the outer shell of the kernel (protection or none), it deals with user<-->kernel interaction. The shell allows the user to perform kernel calls; primarily the focus here is on the ability to execute other programs interactively, because once you can execute programs you may run editors and compilers to produce programs to deal with the rest of the kernel calls. Generally file browsers like Nautilus are also shells, although perhaps not in full right, as they mostly don't support supplying custom arguments, but they are shells none the less. | |
May 16, 2012 at 22:58 | comment | added | user6517 | In addition to the comment above: Unix is, by design, a multi-user environment. Generally, people would interact with a unix environment using a thin client - a keyboard and monitor that would send commands over a wire to the unix server. TTY, if I remember correctly, used to stand for TeleTYpe - thus, every user using the system would have to interface through a tty. This is why multiple tty files exist in the filesystem; there's one for each teletype in use (and possibly not in use). | |
Mar 10, 2012 at 20:34 | comment | added | Chris Page | “…the terminal…handles key combinations like Ctrl+C to kill the foreground job and Ctrl+Z to suspend it” Not quite: the terminal still merely sends control characters, it’s the tty device that decides how to handle them, and it’s configurable. By default the tty device converts the control characters into signals sent to the shell (and other processes). | |
Jan 13, 2012 at 14:58 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |
mention job control in the division of labor
|
Aug 29, 2011 at 21:12 | comment | added | derobert |
There is also another meaning of "console" under Linux. The console (there is only one) is where printk of sufficient priority goes (e.g., kernel panics). It is set by passing console=DEVICE,... on the kernel command line (e.g., console=ttyS0,115200 for a the first serial port, at 115,200 bps). Normally it defaults to the virtual-terminal, but that can be changed when the kernel is compiled.
|
|
Aug 27, 2011 at 19:33 | review | Suggested edits | |||
Aug 27, 2011 at 19:46 | |||||
Dec 30, 2010 at 17:46 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 2.5 |
added a section on the division of labor between the terminal and the shell; added 2 characters in body
|
Dec 7, 2010 at 19:00 | comment | added | ændrük | This is the image in my mind for the shell metaphor. | |
Nov 28, 2010 at 11:43 | vote | accept | Lazer | ||
Nov 17, 2010 at 19:27 | comment | added | Gilles 'SO- stop being evil' | @phunehehe: Right, that's a different meaning of “shell”, in common use in operating system design: the shell is the outer part of the kernel. It's not unix terminology: Unix kernels don't tend to have a component that one could call a shell. | |
Nov 17, 2010 at 19:20 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 2.5 |
non-pseudo ttys are provided by hardware, not by the kernel alone
|
Nov 17, 2010 at 13:46 | comment | added | phunehehe | I read in a book (forget the name, sorry), that the shell is supposed to protect the kernel: the user interacts with the shell, instead of directly with the kernel. | |
Nov 17, 2010 at 4:04 | comment | added | Chris Johnsen | Only quibble: I would say that both kinds of ttys are “provided by” the kernel. The difference I would emphasize is that hardware ttys (e.g. serial lines and the built-in, text-mode console) have one end connected to hardware and one end connected to software (e.g. login programs and/or shells) while pseudo-ttys have both ends connected to software (e.g. a terminal emulator on one end and shell on the other). | |
Nov 16, 2010 at 22:31 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 2.5 |