---
layout: page
category_title: Intermediate commands
category-page: intermediate
tags: who user list log
author: Marco Farace
title: Who/WhoamI
---
The who utility displays a list of all users currently logged on, showing
for each user the login name, tty name, the date and time of login, and
hostname if not local.
Flags
- -b: Display time of last system boot.
- -d: Print dead processes.
- -H: Write column headings above the regular output.
- -m: Only print information about the current terminal. This is the
POSIX way of saying who am i.
- -q: ``Quick mode'': List only the names and the number of users cur-
rently logged on. When this option is used, all other options are
ignored.
- -s: List only the name, line and time fields. This is the default.
- -T: Print a character after the user name indicating the state of the
terminal line: `+' if the terminal is writable; `-' if it is not;
and `?' if a bad line is encountered.
- -u: Print the idle time for each user, and the associated process ID.
- am I: Returns the invoker's real user name.
- file: By default, who gathers information from the file /var/run/utmpx.
An alternative file may be specified.