Skip to content
FLAVIO COPES
flaviocopes.com
2026

Linux commands: who

By Flavio Copes

Learn how the Linux who command lists the users currently logged in to the system, why you appear multiple times, and what the -aH flags add to the output.

~~~

The who command displays the users logged in to the system.

Unless you’re using a server multiple people have access to, chances are you will be the only user logged in, multiple times:

Terminal showing who command output with user flavio logged in multiple times on different ttys terminals with timestamps

Why multiple times? Because each shell opened will count as an access.

You can see the name of the terminal used, and the time/day the session was started.

The -aH flags will tell who to display more information, including the idle time and the process ID of the terminal:

Terminal showing who -aH command output with column headers USER LINE WHEN IDLE PID COMMENT and detailed session information

The special who am i command will list the current terminal session details:

Terminal showing who am i command output displaying single line with current user flavio on ttys004 terminal

Terminal showing who -aH am i command with detailed header columns and current session info including PID for user flavio

The who command works on Linux, macOS, WSL, and anywhere you have a UNIX environment

Tagged: CLI · All topics
~~~

Related posts about cli: