News for hackers. Stuff that matters.
Re:What is the difference between a 'terminal', a 'shell', a... by khazhoux on Saturday January 13, 2024 @08:26PM (#38986503)
Classic Stack Overflow, willfully ignores the likely intent of the questioner, with pedantic answers which ignore the most common modern usages of the terms. Subtle condescension and authoritative declarations (“a console MUST be a piece of hardware”) which are actually incorrect in modern usage.

SO really does attract misanthropes.

Re:What is the difference between a 'terminal', a 'shell', a... by blendergeek on Saturday January 13, 2024 @08:34PM (#38986542)
Fortunately the top answer doesn't suffer from that issue as far as I can tell. It is much longer and explains both the etymology of the terms and how they are used today.
Re:What is the difference between a 'terminal', a 'shell', a... by khazhoux on Saturday January 13, 2024 @09:05PM (#38986698)
But it misses the most obvious answer (and most likely where the question originated from): terminal, console, and shell often refer to the same thing. If one is following a tutorial and it says to “enter this command into your console”, they mean the same as type it in your terminal app or into your shell. The terms are indeed somewhat interchangeable, as a starting point at least for the clearest answer.

Then we can dig into actual differences: the shell is actually an application that runs inside the terminal/console, and you can swap in your favorite shell app; on MacOS, the Console and Terminal apps look similar, but Terminal is what you should use normally, with Console more for debugging system outputs. And so on.

Humor people with practical answers sometimes, for christsake, instead of these agonzing pendantic expositions. Side notes on pseudo-ttys, ioctl, virtual condoles, and control sequences when the OP posted an elementary question?? Yeah, we get it, professor: you are overburdened with information which you must share.

Re:What is the difference between a 'terminal', a 'shell', a... by zzyzxd on Saturday January 13, 2024 @11:42PM (#38987550)
Well, the OP already realized that they often refer to the same thing, and was just curious about the fundamental differences.

> Side notes on pseudo-ttys, ioctl, virtual condoles, and control sequences when the OP posted an elementary question?? Yeah, we get it, professor: you are overburdened with information which you must share.

I don't know if it's elementary but I knew ioctl long before I learned that "tty" stands for teletypewriter. (Top answer: "tty is a strange abbreviation". Me: ha, sure, because if you are curious enough to look up for the abbreviation, the long form itself is pretty much self explanatory).

The answer doesn't feel condescending to me. Similarly, my professor talked to me like that when I was a student and I didn't find that condescending -- it's just a person who knows a particular topic better than me trying to make a gentle introduction.

If someone not only answered my question, but also voluntarily spent another hour telling me all the background stories, I would have nothing but gratitude. Sure, some of those people may not be the nicest person in the world. if you just need a quick answer and be done, you can ask ChatGPT to summarize it.

Re:What is the difference between a 'terminal', a 'shell', a... by basil-rash on Saturday January 13, 2024 @09:08PM (#38986721)
That was already included in the question, there’s no use repeating it in the answer.
Re:What is the difference between a 'terminal', a 'shell', a... by mixmastamyk on Saturday January 13, 2024 @11:49PM (#38987586)
The person asked for the exact differences. “All the same thing” is not only false but specifically not what they asked for.

If you can’t get a straight answer at a UNIX site, where can ya get it?

Re:What is the difference between a 'terminal', a 'shell', a... by c0pium on Sunday January 14, 2024 @12:38AM (#38987831)
GP completes the holy SO triptych.

One person asks for the specifics of an obscure technical thing. A second person gives a detailed answer with a ton of explanation which thoroughly answers the question. A third person projects their frustration with thorough answers onto this interaction, and laments that nobody gives good answers anymore dagnabit, while missing that their proposed answer is in fact a terrible fit for the question that was asked.

Bonus points for calling someone professor in a derogatory way are cancelled out by (predictably) misspelling chrissakes.

Re:What is the difference between a 'terminal', a 'shell', a... by arbitrandomuser on Sunday January 14, 2024 @01:23AM (#38988027)
as others have pointed out question poster wanted to know the difference , and the top answer on SO was detailed enough to explain.

there was nothing condescending about at-least the top few answers ( i didnt go through all of them) and ironically by being snarky here , you are being the very thing you accuse SO of

Re:What is the difference between a 'terminal', a 'shell', a... by caskstrength on Sunday January 14, 2024 @03:10AM (#38988483)
> But it misses the most obvious answer (and most likely where the question originated from): terminal, console, and shell often refer to the same thing.

Not really. If you ask people at watercooler which _shell_ they are using you are getting 20 minutes conversation about whether zsh is better than fish or vice versa. And if you ask same question about _terminal_ it would be mostly about whether their favorite terminal is GPU accelerated and supports ligatures :)

Re:What is the difference between a 'terminal', a 'shell', a... by khazhoux on Sunday January 14, 2024 @04:47AM (#38988975)
Your answer is already better than SO's, in terms of relevance to the question as asked.
Re:What is the difference between a 'terminal', a 'shell', a... by thegabriele on Sunday January 14, 2024 @04:56AM (#38989026)
...What "at watercooler" stands for?
Re:What is the difference between a 'terminal', a 'shell', a... by Fissionary on Sunday January 14, 2024 @05:48AM (#38989292)
Watercoolers are devices for dispensing cold (or hot) water from huge plastic bottles in a classic office. People go there to get their hydration fix, say hello to each other, and this ostensibly turns into a longer chat, as everyone keeps procrastinating.

I haven't seen an actual watercooler for the last 10 years, so they're probably becoming less common in tech companies.

Re:What is the difference between a 'terminal', a 'shell', a... by thegabriele on Sunday January 14, 2024 @07:08AM (#38989707)
Oh yeah, seen a ton of those in movies (but not in real life tho). Thanks
Re:What is the difference between a 'terminal', a 'shell', a... by terinjokes on Sunday January 14, 2024 @10:41AM (#38991384)
At least in tech companies, they seem to being replaced by taps that can dispense hot or cold, still or sparkling water, with optional flavors added.
Re:What is the difference between a 'terminal', a 'shell', a... by benj111 on Sunday January 14, 2024 @05:55AM (#38989330)
"open your shell" can mean the same as "open your terminal".

One always (?) Involves the other.

Re:What is the difference between a 'terminal', a 'shell', a... by xanderlewis on Sunday January 14, 2024 @03:53AM (#38988675)
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.
Re:What is the difference between a 'terminal', a 'shell', a... by denton-scratch on Sunday January 14, 2024 @05:29AM (#38989198)
> 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".

Re:What is the difference between a 'terminal', a 'shell', a... by xanderlewis on Sunday January 14, 2024 @12:55PM (#38992572)
I 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).

Re:What is the difference between a 'terminal', a 'shell', a... by Izkata on Sunday January 14, 2024 @02:37PM (#38993659)
I 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.
Re:What is the difference between a 'terminal', a 'shell', a... by medo-bear on Sunday January 14, 2024 @06:27AM (#38989501)
> terminal, console, and shell often refer to the same thing.

often, but not always. if someone tells me they made a terminal program to me it means that it can run without any gui. particularly i can run it in tty and without a windowing system. if someone tells me they made a shell program then its much harder for me to assume the above. actually it probably just means a shell script

Re:What is the difference between a 'terminal', a 'shell', a... by medstrom on Sunday January 14, 2024 @06:31AM (#38989519)
Well, if you assume they don't mean GNOME Shell, but something like Bash shell, it's still easy to assume it'll work in a terminal. :-)

A pure shell program (without a TUI library like ncurses) is just a more broad concept, as it would also work outside a terminal in something like Emacs' eshell, but it'll always work in a terminal too.

Re:What is the difference between a 'terminal', a 'shell', a... by pompino on Saturday January 13, 2024 @10:31PM (#38987173)
>willfully ignores the likely intent of the questioner,

>Subtle condescension and authoritative declarations

Well maybe we shouldn't ignore the intent of the answer ;)

>SO really does attract misanthropes.

Wow, I think you're reading way to much into this.

Re:What is the difference between a 'terminal', a 'shell', a... by charonn0 on Saturday January 13, 2024 @09:06PM (#38986711)
I don't see the problem you do.

SO is a Q&A based knowledge base. Questions are supposed to be somewhat open-ended prompts that inspire experts to write detailed and informative responses. The OP seems to be an excellent example this.

Re:What is the difference between a 'terminal', a 'shell', a... by matheusmoreira on Sunday January 14, 2024 @12:34AM (#38987817)
> Questions are supposed to be somewhat open-ended prompts that inspire experts to write detailed and informative responses.

> open ended

I recently tried asking a question like that. Easy but effective optimization techniques for programming languages. Hell I included an answer myself and was going to add more. The result wasn't pretty. While I was typing up a second answer, the question was downvoted, closed, someone welcomed me to the site and then deleted the comment, the answer I included with the post was downvoted not for being wrong but for "enabling" a bad question, I got told to get out and go blog about it instead and then a few days later the entire thing was deleted like worthless spam.

Re:What is the difference between a 'terminal', a 'shell', a... by dr_kiszonka on Sunday January 14, 2024 @03:25AM (#38988550)
Yikes.
Re:What is the difference between a 'terminal', a 'shell', a... by realusername on Sunday January 14, 2024 @05:11AM (#38989109)
I had the same experience myself, Stackoverflow isn't going down because of AI which they use as a scapegoat but because the community became more and more toxic to the point of no return and there's no blaming others for that.
Re:What is the difference between a 'terminal', a 'shell', a... by Izkata on Sunday January 14, 2024 @02:41PM (#38993686)
> techniques

Plural? Obviously that wouldn't be accepted. It should be something that can have a single best answer.

Open-ended that allows an expert to expand and explain doesn't mean free-for-all.

Re:What is the difference between a 'terminal', a 'shell', a... by matheusmoreira on Sunday January 14, 2024 @04:30PM (#38994625)
Yes, plural. It was a question similar to this one:

https://stackoverflow.com/q/500607

Some of the greatest questions on StackOverflow are open ended like that.

I've gotten people to reverse closures before. They closed a Q&A pair I made on the finance site where I explained how I did something specific with the ledger software. Closed, then reopened with a positive score.

Not this time, I guess. I linked that question as an example but it didn't really convince anyone. I was frustrated but eventually I just accepted it, left it alone and went away for a few days.

Came back later to find they had just deleted the question along with the one answer I managed to write. That made me feel like shit. Certainly didn't expect that, especially not from a stack exchange site that's still in beta and thus in need of content.

Re:What is the difference between a 'terminal', a 'shell', a... by Izkata on Sunday January 14, 2024 @09:29PM (#38996794)
That's actually a good example of why it happened, and may well be referenced in the meta threads when they talked about it - not only is there no correct answer, these usually acted like clickbait, farming for reputation to gain access to moderation tools.
Re:What is the difference between a 'terminal', a 'shell', a... by matheusmoreira on Tuesday January 16, 2024 @05:26PM (#39020019)
> not only is there no correct answer

There is no single correct answer. The answers posted can all be correct and they'll certainly help the people who ask these perennial questions since the question will show up on search results.

> these usually acted like clickbait, farming for reputation to gain access to moderation tools.

The reputation problem is solved by turning it into a community wiki so that votes won't be counted towards reputation. At least it used to be solved that way. Do those still exist? I wrote the posts on mobile and didn't see the usual "turn this into a community wiki" checkbox. I assumed they got rid of it. They've gotten rid of a lot of things over the years, I didn't really keep track.

Nothing you said explains why the post was deleted. They could've closed and locked it to prevent additional answers and voting if it's so problematic. They went the extra mile and completely trashed the answer I wrote. They trashed the efforts of other people who wrote helpful comments with references to additional papers on optimizations. Those comments taught me new stuff. They just deleted all of it. I discovered they had deleted the question because I tried to find those references and couldn't.

I can handle closures, downvotes, rude comments, even insults. Wikipedia style deletionism though? Yeah, that makes me think twice before posting anything there.

Re:What is the difference between a 'terminal', a 'shell', a... by matheusmoreira on Saturday January 13, 2024 @11:54PM (#38987613)
I don't know, it wasn't always like this. Stack Exchange communities are very different now, I don't think they're the same sites I used to participate in. Coming back to them now resulted in some very negative experiences, people treated me like some worthless spammer whose posts deserve to not only be closed but also literally deleted. It wasn't always like that.
Re:What is the difference between a 'terminal', a 'shell', a... by HPsquared on Saturday January 13, 2024 @08:31PM (#38986522)
SO is full of people going too narrow, HN is full of people going too broad.
Re:What is the difference between a 'terminal', a 'shell', a... by maegul on Saturday January 13, 2024 @09:09PM (#38986725)
Ha, yes. But in HN’s defence, I think HN is not willing and capable of correcting toward narrowness when needed than SO is the other way.
Re:What is the difference between a 'terminal', a 'shell', a... by corethree on Saturday January 13, 2024 @08:28PM (#38986511)
A shell is where a turtle lives.
Re:What is the difference between a 'terminal', a 'shell', a... by quickthrower2 on Sunday January 14, 2024 @12:01AM (#38987649)
Tortoise SVN and Tortoise Git like that joke
Re:What is the difference between a 'terminal', a 'shell', a... by andirk on Saturday January 13, 2024 @11:35PM (#38987514)
A console is what turtle's play video games on.
Re:What is the difference between a 'terminal', a 'shell', a... by nick222226 on Saturday January 13, 2024 @11:41PM (#38987544)
tty is when the turtle is talking to you now instead of later
Re:What is the difference between a 'terminal', a 'shell', a... by bazoom42 on Sunday January 14, 2024 @06:02AM (#38989372)
Your comment is entitely unhelpful though. It is everything you accuse the SO answer of being.
Re:What is the difference between a 'terminal', a 'shell', a... by mock-possum on Monday January 15, 2024 @06:28PM (#39007471)
Yeah the irony of using a browser to post “a console MUST be a piece of hardware” when hitting F12 easily belies the statement is just mind boggling.