I am trying to find out which tty or pts is being run by which process.

My research so far is that:

  • tty is a kernel or backend terminal to handle lower level stuffs
  • pts is a pesudo terminal to allow user to communicate with the system
  • there are a lot of tty and pts files in /dev but cannot be read

Would like to ask the following questions:

  • Why does /dev/pts and /dev contains so much numbers (eg 1-26) despite ps -aux | grep pts only showing 4 pts entries

  • Is it possible to determine what process is running a pts or tty? As I read that ssh spawns a new shell, but not sure if its a pts or tty

Your Answer

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

Browse other questions tagged or ask your own question.