I ran the last command in Linux; I got the output:

pts/0, pts/1, pts/2, pts/3, pts/4 and pts/5

What does pts mean?


The pts/0 is telling you which "pseudo terminal" the user was logged in on. In this case it's terminal 0,1,2 etc.
A tty is a native terminal device, the backend is either hardware or kernel emulated.
A pts (pseudo terminal device) is a terminal device which is emulated by an other program (example: xterm, screen, or ssh are such programs).

  • Thanks Mazs,Can we get the description of that in the last command,Say like if it is pts/1 it is for ssh,pts/2 it is from winscp,pts/3 it is su. – Ahmed Vagher Oct 13 '15 at 19:20
  • @AhmedVagher No, absolutely not. The first pseudoterminal that's created gets the number 0, the next one gets 1 and so on. – Gilles 'SO- stop being evil' Oct 13 '15 at 22:06
  • Just worth noting that different naming/numbering schemes exist, e.g. one pty might be at /dev/ptyp0. – phk Oct 13 '15 at 23:14
  • @AhmedVagher As you're a reputation 6 user: If this answer helped you, don't forget to click the grey at the left of this text, which means Yes, this answer is valid! ;-) – Fabby Oct 13 '15 at 23:47
  • Actually "pts" stands for pseudo-terminal-slave. The answer as given confuses tty and pty, making it less than useful. – Thomas Dickey Oct 14 '15 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.