Joke Collection Website - Public benefit messages - Introduction to Linux serial port driver terminology?

Introduction to Linux serial port driver terminology?

In Linux, terms such as "console", "terminal", "console", "tty", and "terminal" are often encountered, and these device files are also often used: ldevconsole, /dev/ttySACO , /dev/tty0, etc. To understand these terms, you need to start with computers from the past.

Initial computers were expensive, and one computer was usually connected to multiple keyboards and monitors for use by multiple people. In the past, there was this kind of device that could be connected to a computer. It only had a monitor and a keyboard, plus a simple processing circuit. It had no ability to process computer information. Users connect to the computer through it (usually through the serial port), then log in to the system and operate the computer. Such a device that only has input and display components (such as a keyboard and monitor) and can be connected to a computer is called a terminal. tty is the abbreviation of Teletype. Teletype is the earliest terminal device, much like a teletype machine. In Linux, tty is used to represent "terminal". For example, kernel files tty_io.c, tty _ioctl.c, etc. are all drivers related to "terminal"; device files /dev/ttySACO, /dev/tty0, etc. also represent Certain types of terminal equipment. "Console" means "console". As the name suggests, the console is a device for users to interact with the system, which is similar to the role of a terminal. In fact, compared with the terminal, the console only has one more function: it can display system information, such as kernel messages and background service messages. From a hardware perspective, both the console and the terminal are devices with input and display functions, and there is no difference. The terms "console", "terminal" and "control terminal" are often used interchangeably and mean the same thing.

The difference between the console and the terminal is reflected in the software. The Linux kernel has been developed a long time ago, and the concepts of "console" and "terminal" are still retained in the code. The command line parameter "console=..." passed in before starting the Linux kernel is used to specify the "console". The console is available before the tty driver is initialized, and is initially used to display kernel messages (such as those output by the printk function).