What does it mean 'to work in a terminal' - The terminal, the TTY, and the shell
Posted by urosp@reddit | linux | View on Reddit | 12 comments
I just wrote a breakdown on what it really means to 'work in the terminal' on Linux. This text breaks down what is a terminal emulator, pty and a shell.
This text is aimed at folks who have played around with the terminal a bit (pretty much everyone on Linux!) and are curious to understand what's going on under the hood. Just scratching the surface here, it should be a quick 10 minute read with some C program examples.
If this is new to you, you might find it interesting to look into how the emulation of ancient hardware from the 70s plays a role here!
I hope it's useful!
edparadox@reddit
I am confused. It's not about "working in the terminal", but what a terminal, a shell, etc. is.
omicronns@reddit
What is the actual difference between tty and pty? I see that ttys are used when switching to text mode virtual console, but how they differ is not explained.
TheG0AT0fAllTime@reddit
tty is teletype. We used to have literal terminals with keyboards which serial off to a main server and people interacted on the system by logging into their username over the terminal in their own little session.
pty is a psuedo teletype. It's what your shell and ssh and such do to emulate a tty experience.
There's probably a better way to word this.
Diligent_End8130@reddit
Thx, l like your write-up on this topic! Very interesting also for people knowing just how to launch the "terminal" and want to know beyond (diving into the *nix philosophy)
urosp@reddit (OP)
Glad you liked it! That was exactly the intent. The first step after just launching the "terminal" (whatever that is!) and understanding the system a little deeper. And as you mentioned, this goes back all the way to Unix, from decades ago.
More to come soon!
theveldt01@reddit
This is very cool, I really like your approach on building the right mental model with the site. I'm gonna go do a deepdive.
DistinctTie6771@reddit
Thank you very much. I like it and it makes sense. You're a great teacher/instructor!
augustuscaesarius@reddit
This is excellent. Saved.
italoghost@reddit
Thanks!
urosp@reddit (OP)
My pleasure! Please consider checking the rest of the website!
RetiredApostle@reddit
I work in the console.
urosp@reddit (OP)
That's the best way to do it!