who [file]

Display who is logged in

Arguments

NameDescription
fileBy default, who gathers information from the file /var/run/utmpx; an alternative file may be specified

Subcommands

NameDescription
amReturns the invoker's real user name

Options

NameDescription
-aSame as -bdlprTtu
-bTime of last system boot
-dPrint dead processes
-HWrite column headings above the regular output
-lPrint system login processes (unsupported)
-mOnly print information about the current terminal
-pPrint active processes spawned by launchd(8) (unsupported)
-q'Quick mode': List only names and number of users currently logged on
-rPrint the current runlevel
-sList only the name, line and time fields (this is the default)
-TPrint a character after the user name indicating the state of the terminal line: '+' writable, '-' not writable, '?' bad
-tPrint last system clock change (unsupported)
-uPrint the idle time for each user and the associated process ID