0

I read that pts is a pseudo-terminal (that we get through ssh or xterm) and tty is the native terminal.

I didn't connect to my PC through ssh or xterm, but I am still getting pts/0 and pts/1 when I type who command. When I open other terminals, the number of pts's increase.

username@machine$ who
username tty7         2020-12-30 11:39 (:0)
username pts/0        2020-12-30 11:39 (:0)
username pts/1        2020-12-30 11:53 (:0)

I am not getting why this is happening, shouldn't there be more tty's after opening other terminals?

Also, when I do su I see that other pts session gets opened for root in auth.log file.

2
  • So how are you connecting and opening these other terminals? :0 indicates an X session, so you must be using a GUI terminal emulator (if not xterm, then gnome-terminal or something else) – muru Dec 30 '20 at 7:07
  • Okay so the GUI terminal application is also considered as pts and the only tty would be that system's main shell. Like through alt+ctlr+F2 and maybe also through grub. right?? – Gaurav Purswani Dec 30 '20 at 7:20
0

as you already hypothesised in your comment:

Okay so the GUI terminal application is also considered as pts and the only tty would be that system's main shell. Like through alt+ctlr+F2 and maybe also through grub. right??

a GUI terminal emulator (be it xterm, gnome-terminal etc) does not open a native terminal (tty) but a pseudo-terminal (pts).

native ones are only those that you reach by pressing Alt+Ctrl+F2 etc.

2
  • 1
    Okay I got it when we log in we start a tty and all the other terminals like bash, ssh sessions etc are pseudo-terminals under that tty. – Gaurav Purswani Dec 30 '20 at 12:11
  • to the downvoter: please explain why you think this answer is wrong. – törzsmókus Jan 21 at 9:38

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.