0

Is the term TTY only a metaphor in modern day Linux systems referring to any CLI environment (direct as in GUI-less distros, and/or indirect as a CLI window in GUI-based distros).

  • 3
    The accepted solution gives a description of what a tty is which I think answers your question. Also, I didn't down-vote you and I don't think this question deserved to be down-voted. – igal Nov 14 '17 at 02:57
  • 2
    This is a worthy question. I found these terms extremely confusing when I first bumped into them; they're not at all easy to disentangle. However, I agree with @igal; this question is reasonably well addressed at https://unix.stackexchange.com/a/4132/135943. – Wildcard Nov 14 '17 at 06:12
  • A command-line interface does not necessary need a terminal or a terminal emulator. On a terminal or terminal emulator you can run not only command-line applications but also character cell applications (also known as full-screen applications), such as aptitude or the text editors vim or nano. – AlexP Nov 14 '17 at 07:33
  • @AlexP , I think I get what you are saying (using nano doesn't require a tty device) but working with the 3 standard stream might require so (and I emphasize the "might"). Is that what you meant? – Arcticooling Nov 14 '17 at 08:13
  • 1
    Using nano absolutely requires a tty; the point is that nano is not a CLI application; it's a character-cell application. Character-cell applications (such as nano or vim or aptitude or mc or lynx) by their very nature need a tty, because they need to have a bidimensional array of cells where to place the characters. A command-line application, such as ls or bc or find works fine without a tty. The three standard streams have nothing to do with terminals. – AlexP Nov 14 '17 at 08:19
  • Nothing necessarily, I assume you meant. Anyway, Alex, thanks for clarifying the difference between CLI apps* and Character-cell apps. This is an important distinction I'll internalize well. – Arcticooling Nov 14 '17 at 08:31
  • 1
    I don't see why the duplicate's answer doesn't address this. It clearly explains that a tty is a type of device file. I know it's a lot of information, but it should answer all your questions if you read through it carefully. – terdon Nov 14 '17 at 11:07
  • I never said it doesn't answer the question as well... – Arcticooling Nov 14 '17 at 11:10
  • 1
    Then I don't see any reason to reopen. Your question has been answered and anyone else with the same question will be redirected to that very comprehensive answer and have their question answered. – terdon Nov 14 '17 at 11:14

1 Answers1

2

It is a metaphor in the sense that the name is coming from the TeleType console writer:

enter image description here

...which was essentially an ancient electromechanical writing machine. It was used as the keyboard of some ancient unix big computer.

Today, the few remaining parts of them are in IT museums. But the console character devices still named as /dev/tty or similarly.

Its current meaning is roughly "kernel-driven character console".

Many character environments don't need a tty device for a functioning CLUI (Command Line User Interface), and may work with or without one.

peterh
  • 9,731