Name
who [options
] [filename
] — coreutils
Synopsis
/usr/bin
stdin stdout - file -- opt --help --version
The who
command lists all logged-in users, one user shell per line:
$ who smith :0 Sep 6 17:09 barrett pts/1 Sep 6 17:10 jones pts/2 Sep 8 20:58 jones pts/4 Sep 3 05:11
Normally, who
gets its data from the file /var/run/utmp. The filename
argument can specify a different data file, such as /var/log/wtmp for past logins or /var/log/btmp for failed logins.[15]
Useful options | |
| Print a row of headings as the first line. |
| For remotely logged-in users, print the hostnames of origin. |
| Also print each user’s idle time at his/her terminal. |
| Also indicate whether each user’s terminal is writable (see |
| Display information only about yourself, i.e., the user associated with the current terminal. |
| Quick display of usernames only, and a count of users. Much like the |
[15] If your system is configured to log those past or failed logins.
Get Linux Pocket Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.