who(show who is logged on)

```
[linuxstudy@xxxx ~]$ w
 13:07:00 up 12 min,  2 users,  load average: 1.24, 2.25, 1.45
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
linuxstu :0       :0               12:56   ?xdm?   7:57   1.22s /usr/libexec/gn
linuxstu pts/0    :0               13:06    4.00s  0.20s  0.08s w
```
```
[linuxstudy@xxxx ~]$ who
linuxstudy :0           2023-07-28 12:56 (:0)
linuxstudy pts/0        2023-07-28 13:06 (:0)
[linuxstudy@xxxx ~]$ 
```
```
[linuxstudy@xxxx ~]$ ls -l  /var/run/utmp
-rw-rw-r--. 1 root utmp 1536  7月 28 13:06 /var/run/utmp
[linuxstudy@xxxx ~]$ cat /usr/lib/tmpfiles.d/systemd.conf 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# See tmpfiles.d(5) for details

d /run/user 0755 root root -
F! /run/utmp 0664 root utmp -

d /run/systemd/ask-password 0755 root root -
d /run/systemd/seats 0755 root root -
d /run/systemd/sessions 0755 root root -
d /run/systemd/users 0755 root root -
d /run/systemd/machines 0755 root root -
d /run/systemd/shutdown 0755 root root -
d /run/systemd/netif 0755 systemd-network systemd-network -
d /run/systemd/netif/links 0755 systemd-network systemd-network -
d /run/systemd/netif/leases 0755 systemd-network systemd-network -

d /run/log 0755 root root -

z /run/log/journal 2755 root systemd-journal - -
Z /run/log/journal/%m ~2750 root systemd-journal - -

a+ /run/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x
A+ /run/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x

z /var/log/journal 2755 root systemd-journal - -
z /var/log/journal/%m 2755 root systemd-journal - -
z /var/log/journal/%m/system.journal 0640 root systemd-journal - -

a+ /var/log/journal    - - - - d:group:adm:r-x,d:group:wheel:r-x
a+ /var/log/journal    - - - - group:adm:r-x,group:wheel:r-x
a+ /var/log/journal/%m - - - - d:group:adm:r-x,d:group:wheel:r-x
a+ /var/log/journal/%m - - - - group:adm:r-x,group:wheel:r-x
a+ /var/log/journal/%m/system.journal - - - - group:adm:r--,group:wheel:r--

d /var/lib/systemd 0755 root root -
d /var/lib/systemd/coredump 0755 root root 3d
[linuxstudy@xxxx ~]$ 
```
```
WHO(1)                           User Commands                          WHO(1)



NAME
       who - show who is logged on

SYNOPSIS
       who [OPTION]... [ FILE | ARG1 ARG2 ]

DESCRIPTION
       Print information about users who are currently logged in.

       -a, --all
              same as -b -d --login -p -r -t -T -u

       -b, --boot
              time of last system boot

       -d, --dead
              print dead processes

       -H, --heading
              print line of column headings

       -l, --login
              print system login processes

       --lookup
              attempt to canonicalize hostnames via DNS

       -m     only hostname and user associated with stdin

       -p, --process
              print active processes spawned by init

       -q, --count
              all login names and number of users logged on

       -r, --runlevel
              print current runlevel

       -s, --short
              print only name, line, and time (default)

       -t, --time
              print last system clock change

       -T, -w, --mesg
              add user's message status as +, - or ?

       -u, --users
              list users logged in

       --message
              same as -T

       --writable
              same as -T

       --help display this help and exit

       --version
              output version information and exit

       If  FILE is not specified, use /var/run/utmp.  /var/log/wtmp as FILE is
       common.  If ARG1 ARG2 given, -m presumed: 'am i'  or  'mom  likes'  are
       usual.

       GNU  coreutils  online  help:  <http://www.gnu.org/software/coreutils/>
       Report who translation bugs to <http://translationproject.org/team/>

AUTHOR
       Written by Joseph Arceneaux, David MacKenzie, and Michael Stone.

COPYRIGHT
       Copyright © 2013 Free Software Foundation, Inc.   License  GPLv3+:  GNU
       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
       This  is  free  software:  you  are free to change and redistribute it.
       There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
       The full documentation for who is maintained as a Texinfo  manual.   If
       the info and who programs are properly installed at your site, the com‐
       mand

              info coreutils 'who invocation'

       should give you access to the complete manual.



GNU coreutils 8.22               November 2020                          WHO(1)```