In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what tty and pts refer to in Linux. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.
tty in Linux indicates the name of the terminal device, which is a character-type device with multiple types;pts refers to the pseudo-terminal, pts/0 when a terminal is opened, and pts when a terminal is opened again.
In Linux system, when we enter a letter, you can see output like tty1,pts/0 through ps,who and other commands. Today, we will introduce the role of these two in the article. It has a certain reference role and hopes to help everyone.
TTY presents:
tty is a general term for terminal equipment. It is a character-type equipment with many types. Therefore, tty is usually used to refer to various types of terminal equipment.
pts presentation:
pts refers to the so-called pseudo-terminal or virtual terminal. When you open a terminal, the name of this terminal is pts/0, but when you open a terminal again, this terminal is named pts/0.
The new terminal is called pts
Under Linux system, put the device name under the special file directory/dev, and the terminal special device file generally has the following types:
(1) Serial port termination (/dev/ttySn)
It is a terminal device connected using computer ports and treats each serial port as a character device. If you want to send data to a port, you can redirect standard output to these special file names on the command line
(2) Pseudoterminal (/dev/pty/)
are pairs of logical end devices, such as/dev/ptyp3 and/dev/ttyp3, that are not directly related to actual physical devices.
(3) Control terminal (/dev/tty)
If the current process has a control terminal, then/dev/tty is the device-specific file for the control terminal of the current process. You can use the command "ps -ax" to see which control terminal the process is connected to. If you are logged in as a shell, then/dev/tty is the terminal you are using. Use the command "tty" to see which actual terminal device it corresponds to.
(4) console terminal (/dev/ttyn, /dev/console)
In UNIX systems, computer monitors are often referred to as console terminals. It emulates a terminal of type Linux and has device-specific files associated with it, and you can also log on to different virtual terminals, thus allowing the system to have several different sessions at the same time. Only system or superuser root can write to/dev/tty0.
About Linux tty and pts refers to what is shared here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
# include # include "cJSON.h" /
© 2024 shulou.com SLNews company. All rights reserved.