3

When running who I can see two "sessions" (it is the correct wording ?) from two remote servers:

pts/0
pts/1

I went to /dev/pts and I can see 0 1

Does that mean that I can have two simultaneous remote connections to the Linux host? Is it a similar concept to CISCO's vty lines?

cyzczy
  • 366
  • A comment about English: “tty's number” = the number of a particular tty (“this terminal is on /dev/pts/3, the tty's number is 3”); “number of ttys” = the total number of ttys (“there are four entries in /dev/pts, the number of ttys is 4”). – Gilles 'SO- stop being evil' Aug 25 '16 at 22:18

1 Answers1

6

Entries are added to /dev/pts dynamically, so you’re not limited by the number of entries already present. The kernel uses character devices with majors from 136 to 143 (see the kernel’s device list), so you can have up to 2048 entries (256 × (143 ‑ 136 + 1)).

LWN recently published an article on the topic which has a ton of details; you’ll also find relevant answers on this site: What is stored in /dev/pts files and can we open them? and What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'? for example.

The underlying concept is known as Unix98 ptys, and appears to be similar to Cisco vtys (from what I’ve understood of the latter).

Stephen Kitt
  • 434,908