← Back to context

Comment by mikkupikku

17 hours ago

You can easily reboot a machine from a web interface, if rebooting the machine is intended to be part of that interface. I do it all the time with my shitty wifi router (which incidentally, also has a TUI interface.)

You're off base with your talk of terminals being "OS constructs" or whatever, I think it's because you're not being precise with what exactly you're talking about. "The terminal" is a combination of a terminal emulator, which is a userspace program which interprets control sequences that tell it which characters to render where. The terminal emulator is connected to a psuedoterminal, which is a pair of files for IPC with some special semantics, notably canonical mode. Importantly, in none of this is anything for controlling the system.

For controlling the system, you need some other program besides a terminal. A shell. A shell isn't part of the terminal, nor part of the operating system except in a broader sense of the term. And it doesn't have special abilities to control the system, anything the shell can do, a TUI or web interface, or any other kind of interface can be made to do.

Anyway, you ssh into a computer and start a TUI. The TUI doesn't render anything, it just sends you text and escape codes. The terminal emulator on your computer interprets this stream of escape codes and text, as a web browser interprets html, and renders it locally.