1 .\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
4 .\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
5 .\" Redistribute and revise at will.
8 .TH PTS 4 2020-08-13 "Linux" "Linux Programmer's Manual"
10 ptmx, pts \- pseudoterminal master and slave
14 (the pseudoterminal multiplexor device)
15 is a character file with major number 5 and
16 minor number 2, usually with mode 0666 and ownership root:root.
17 It is used to create a pseudoterminal master and slave pair.
22 descriptor for a pseudoterminal master
23 and a pseudoterminal slave device is created in the
26 Each file descriptor obtained by opening
28 is an independent pseudoterminal master with its own associated slave,
30 be found by passing the file descriptor to
33 Before opening the pseudoterminal slave, you must pass the master's file
39 Once both the pseudoterminal master and slave are open, the slave provides
40 processes with an interface that is identical to that of a real terminal.
42 Data written to the slave is presented on the master file descriptor as input.
43 Data written to the master is presented to the slave as input.
45 In practice, pseudoterminals are used for implementing terminal emulators
48 in which data read from the pseudoterminal master is interpreted by the
49 application in the same way
50 a real terminal would interpret the data, and for implementing remote-login
53 in which data read from the pseudoterminal master is sent across the network
54 to a client program that is connected to a terminal or terminal emulator.
56 Pseudoterminals can also be used to send input to programs that normally
57 refuse to read input from pipes (such as
65 The Linux support for the above (known as UNIX 98 pseudoterminal naming)
68 filesystem, which should be mounted on