Skip to content
  • Craig Small's avatar
    library,w: Only show and count user sessions · 734930e4
    Craig Small authored
    Previously all sessions were used
    library - procps_users counted sessions, not user sessions
    w - showed all sessions, not user sessions
    
    $ loginctl list-sessions
    SESSION  UID USER   SEAT  LEADER CLASS         TTY  IDLE SINCE
         10    0 root   -     17860  manager-early -    no   -
         12 1000 csmall seat0 19370  user          tty5 no   -
          5 1000 csmall seat0 4629   user          tty4 no   -
          6 1000 csmall -     4644   manager       -    no   -
          9    0 root   seat0 3633   user-early    tty2 no   -
    $ loginctl list-sessions
    SESSION  UID USER   SEAT  LEADER CLASS         TTY  IDLE SINCE
         10    0 root   -     17860  manager-early -    no   -
         12 1000 csmall seat0 19370  user          tty5 no   -
          5 1000 csmall seat0 4629   user          tty4 no   -
          6 1000 csmall -     4644   manager       -    no   -
          9    0 root   seat0 3633   user-early    tty2 no   -
    
    5 sessions listed.
    $ loginctl list-users
     UID USER   LINGER STATE
       0 ...
    734930e4