The terminal, the TTY, and the shell
Summary
An in-depth explainer of the three core layers involved when using a Linux terminal: the terminal emulator, the TTY/pty, and the shell. It clarifies how they interact, what each layer owns, and how escape sequences and line discipline work, with practical examples.