I know Linux supports multiple users being logged in at the same time.

But what's the maximum number of users that can be logged into Linux at the same time?

I see there are there are 69 tty files (ttyn or ttysn, where n is an integer, such as tty0, tty1, tty2... ) in my /dev directory. I assume that these files are the shells. So I am thinking that this Linux system will support only 69 user logged in simultaneously.

Is my thinking correct? If my assumption is wrong, please explain the users limit of Linux, including how it's implemented.

Also, how do I access the details of already logged in users? I know commands w, who, but I am looking for sophisticated tools.

2 Answers 2


When logging in using SSH, you use a pseudo-terminal (a pty) allocated to the SSH daemon, not a real one (a tty). Pseudo-terminals are created and destroyed as needed. You can find the number of ptys allowed to be allocated at one time at /proc/sys/kernel/pty/max, and this value can be modified using the kernel.pty.max sysctl variable. Assuming that no other ptys are in use, that would be your limit.

w, who, and users are the canonical tools for accessing information about logged in users. last and lastlog also contain historical data.

  • 1
    could you please tell me about the original tty limit , and where the information will be saved that is returned by last command?
    – neotam
    Commented Apr 19, 2013 at 17:56
  • 2
    @usernaveen The maximum number of TTYs on modern Unices is largely limited by the number of virtual consoles you have available. The information shown by last is usually stored in /var/log/wtmp.
    – Chris Down
    Commented Apr 19, 2013 at 19:28
  • Probably the upper limit of an unsigned int. Commented Apr 19, 2013 at 20:13
  • If all connections are made by network, then the limit should be roughly about 64000.
    – ott--
    Commented Apr 19, 2013 at 20:32
  • @ott-- Not necessarily. You can have multiple interfaces, so you essentially have an infinite number of available ports.
    – Chris Down
    Commented Apr 19, 2013 at 20:43

From a Debian machine like Ubuntu, if you check at

cat /usr/include/bits/typesizes.h | grep U32

shows that the number is 2*32 which is around: 4294967296 users who can be added to the system

cat /proc/sys/kernel/pty/max

shows 4096 as the totals number of simultaneous number of logged in users

  • 1
    CentOS is RHEL derived, not Debian.
    – Edward
    Commented Jun 19, 2019 at 11:47
  • yes you are right, a typo there @Edward Commented Jun 20, 2019 at 6:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .