3 ms·
The terminal has a feature called "local echo". When you type something, it goes to the application (almost always its stdin file descriptor, but it can open /
by aaronmdjones 9y ago
The terminal has a feature called "local echo".
When you type something, it goes to the application (almost always its stdin file descriptor, but it can open /dev/tty and read that too).
When local echo is enabled, the terminal also prints what you type.
Applications that prompt for passwords simply (temporarily) disable local echo.