Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Hello Ahmed, and welcome to U&L! Don't be afraid to use the search bar for key words in your question -- for example, unix.stackexchange.com/questions/21280/… would be a good start. – Jeff Schaller Oct 13 '15 at 18:13
up vote 7 down vote accepted

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).

share|improve this answer
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 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 posting your answer, you agree to the privacy policy and terms of service.

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