-   Linux - General (
-   -   tty and pts (

culin 08-02-2007 12:27 AM

tty and pts
Hi all,
i have some doubts regarding tty and pts...
for example this is a part of the output from my pc when i run ps -aux

root      2893  0.0  0.0  1552  364 tty1    Ss+  Jul09  0:00 /sbin/mingetty tty1
root      2894  0.0  0.0  1552  364 tty2    Ss+  Jul09  0:00 /sbin/mingetty tty2
root      2895  0.0  0.0  1556  364 tty3    Ss+  Jul09  0:00 /sbin/mingetty tty3
root      2896  0.0  0.0  1552  364 tty4    Ss+  Jul09  0:00 /sbin/mingetty tty4
root      2897  0.0  0.0  1552  364 tty5    Ss+  Jul09  0:00 /sbin/mingetty tty5
root      2898  0.0  0.0  1556  364 tty6    Ss+  Jul09  0:00 /sbin/mingetty tty6

root    14702  0.0  0.2  4424  1200 pts/6    S    10:15  0:00 su
root    14705  0.0  0.2  4516  1488 pts/6    S    10:15  0:00 bash
root    18128  0.0  0.1  4488  928 pts/6    R+  10:44  0:00 ps -aux

root    14552  0.0  0.2  4424  1196 pts/4    S    10:09  0:00 su
root    14555  0.0  0.2  4512  1464 pts/4    S    10:09  0:00 bash
root    14575  0.0  0.3  4516  1528 pts/4    S+  10:10  0:00 bash

IN THE ABOVE the TTY column.. what is the meaning of tty1 tty2 and so on.. and pts/4 pts/6 and so on...
whether tty and pts are abbrevations ?
please share ur knowledge on these things..
1. what is the meaaning of tty or TTY ? what is the significance of this column in ps ouptut
2. what is the usage or use of tty ?
3. what is pts ?
4. what is the difference between tty1 tty2 and ttyS1 ttyS2 and other tty's
thanks.. :)

Simon Bridge 08-02-2007 12:42 AM

tty = teletypewriter - it refers to the terminal that is running the process. (man tty)
pts = pseudo terminal - similar to above. (man pts)

The TTY heading is explained in the man page for ps (man ps)

ttySx is a serial device terminal... the old style notation.


ps -aux is supposed to list processes for user name "x". You should use ps aux instead, even though the program can handle this obvious typo.

culin 08-02-2007 01:18 AM

Thanks for the info Simon Bridge, :)
but when someone connects to my PC through telnet it displays it as pts/4 or pts/6, so is there any device file naming convention followed by linux...?? say for serial devices and other devices ?

Simon Bridge 08-02-2007 01:43 AM

Did you read the man pages? That question is answered in the first paragraph.


      ptmx and pts - pseudo-terminal master and slave

      The  file  /dev/ptmx  is a character file with major number 5 and minor
      number 2, usually of mode 0666 and  of  root.root.  It  is
      used to create a pseudo-terminal master and slave pair.

      When a process opens /dev/ptmx, it gets a file descriptor for a pseudo-
      terminal master (PTM), and a pseudo-terminal slave (PTS) device is cre‐
      ated  in the /dev/pts directory.

When someone telnets into your system, linux sets up a pair of terminals - a master and a slave. The terminals live in the directory /dev/pts/ of the appropriate host and is named for the terminal number. i.e. /dev/pts/0

BTW: you shouldn't allow telnet. Use ssh instead.

<off your sig> It is not "u" but "you" who learns from mistakes.
When someone directs you to a man page, read it or risk an RTFM.

culin 08-02-2007 04:30 AM

ok thanks for that information....and i have altered my signature too.[:)]

gaosanyong 03-07-2013 05:59 PM

Hi culin,

TTY (TeleTYpewriter ) ports are direct connections to the computer such as a keyboard/mouse or a serial connection to the device. PTS (Pseudo Terminal Slave) connections are SSH connections or telnet connections. All of these connections can connect to a shell which will allow you to issue commands to the computer.

Original URL:

All times are GMT -5. The time now is 03:40 AM.