Terminal special device files for Linux systems

Source: Internet
Author: User

In the Linux system device special file directory/dev/, terminal Special equipment files generally have the following:
1. Serial port terminal (/DEV/TTYSN)
The serial port terminal (Serial Port Terminal) is a terminal device connected using a computer serial port. The computer sees each serial port as a character device. For a while these serial port devices are often referred to as end-device, because it is used to connect the terminal at that time. The serial port corresponding to the device name is/dev/tts/0 (or/DEV/TTYS0),/DEV/TTS/1 (or/dev/ttys1), etc., the device number is (4,0), (4,1), respectively, corresponding to the DOS system COM1, COM2 and so on. To send data to a port, you can redirect standard output to these special file names on the command line. For example, at the command-line prompt, type: Echo Test >/dev/ttys1 will send the word "test" to the device connected to the TtyS1 (COM2) port.


For example/DEV/PTYP3 and/DEV/TTYP3 (or/dev/pty/m3 and/dev/pty/in device file systems, respectively) S3). They are not directly related to the actual physical device. If a program considers PTYP3 (master device) as a serial port device, its read/write operation on that port is reflected on the other TTYP3 (slave device) corresponding to the logical terminal. The TTYP3 is a logical device that another program uses for read and write operations. Telnet Host A is to communicate with host A's login program through "Pseudo Terminal".


3, control terminal (/dev/tty)



5 Virtual terminal (/dev/pts/n)
Pseudo terminal in Xwindows mode. If I use Konsole under Kubuntu, I use the virtual terminal, and I can see/DEV/PTS/1 with the TTY command.


6 Other types
The Linux system also has many other kinds of terminal equipment special files for many different character devices. For example,/dev/ttyin terminal equipment for ISDN devices. Don't repeat it here.
TTY devices include virtual consoles, serial ports, and pseudo-terminal units.
/dev/tty represents the current TTY device and enters echo "Hello" >/dev/tty in the current terminal, which is displayed directly in the current terminal.


Terminal special device files for Linux systems

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.