3 ms·
Is it correct to say that a shell runs inside the terminal? Or that it runs (as any process does) alongside it and happens to have its input and output connecte
by xanderlewis 3y ago
Is it correct to say that a shell runs inside the terminal? Or that it runs (as any process does) alongside it and happens to have its input and output connected up to the terminal?
I get that you don’t like pedantry, but this seems an important conceptual distinction that I (as someone who doesn’t know much about the internals of OSs) wouldn’t want to get wrong.
- denton-scratch 3y ago> Is it correct to say that a shell runs inside the terminal? Nope. We use the word "terminal" nowadays to refer to a piece of software that is a terminal emulator. But the thing being emulated is what used to be called a "dumb terminal", which was a piece of hardware that couldn't itself run user software. "Shell" is the odd man out among these terms; a shell is always a piece of software. A terminal isn't necessarily a text device. I remember graphics terminals by Tektronix and Apollo. I never saw a blit terminal, but those things existed too. On SystemV, the console was simply the privileged terminal. My memory is poor, but I seem to recall that (a) there could only be one console, which had to be connected to a specific port; (b) you could only become root if you were on the console. On some early computers, I believe the term "console" referred to the panel of lights and toggle-switches on the case of the processor. The switches could be used to control memory contents and processor state; so OG wizards were said to be able to e.g. "toggle in the bootloader from the console".
- xanderlewis 3y agoI thought so. My intention was more to subtly correct parent rather than to ask a genuine question. ...although I've learnt a bit more from your reply. Thanks! MacOS seems to still have something called Console which functions somewhat similarly to what you describe (the panel of lights and toggle-switches, rather than a two-way communication device).
- Izkata 3y agoI think of "console" as "point of interaction": it's the prompt that waits for input inside the shell, as well as those blinky lights on old hardware computers.