The difference between tty and console and terminal

  
                  

When I read the book "orange‘s, the implementation of the operating system", the seventh chapter also appeared the two terms tty and console. I checked some pages, but I couldn't explain them clearly. I gave some understanding based on my own thinking.

tty, including mouse, keyboard, touch screen, etc., they are all character devices, usually used for input.

console, its role is to display the results, usually console is the display, it can only output, can not be entered.

The role of terminal is to interact with the user, so you can receive input from the tty device. It includes a set of graphical interfaces that can be displayed to receive input, plus the basic processing of these inputs.

The interface after Windows boot is a terminal we are facing. This interface provides a set of support for mouse click, double click, drag, tap keyboard, etc., and supports double-click to open various applications. And show the results to us through the screen.

In Linux, the more intuitive example of terminal is the command window. An intuitive example of a console is the display. We will type the command in the command window and it will be displayed on the screen. For example, below ls, you can see the contents of the folder, which is displayed on the screen.

We can simplify the understanding as follows: Normally, the terminal receives the input of the tty and processes it, and the result is displayed through the console.

Need to say: These three words can be translated into terminals, so it is difficult to distinguish these three concepts under linux, especially confusing.

Copyright © Windows knowledge All Rights Reserved