who

v0.0.26
who [OPTION]... [ FILE | ARG1 ARG2 ]

Print information about users who are currently logged in.

Options

--all, -a

same as -b -d --login -p -r -t -T -u

--boot, -b

time of last system boot

--dead, -d

print dead processes

--heading, -H

print line of column headings

--login, -l

print system login processes

--lookup

attempt to canonicalize hostnames via DNS

-m

only hostname and user associated with stdin

--process, -p

print active processes spawned by init

--count, -q

all login names and number of users logged on

--runlevel, -r

print current runlevel

--short, -s

print only name, line, and time (default)

--time, -t

print last system clock change

--users, -u

list users logged in

--mesg, --message, --writable, -T, -w

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

Examples

Display the username, line, and time of all currently logged-in sessions:

who

Display information only for the current terminal session:

who am i

Display all available information:

who -a

Display all available information with table headers:

who -a -H

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.