Linux Terminal Command: who

The who command is an essential tool in User & Permission Management. In this tutorial, we will explore what who does, look at everyday examples, and cover advanced options to supercharge your command-line workflow.


Concept & Explanation

The who command prints a simplified list of users currently logged into the system, detailing their terminal lines and session login times.


Common Options & Syntax

who [options] [arguments]

Here are the most common flags used with who:


1. Interactive Example (Simple)

Here is how most people run the command:

# Example
who

What it does: Lists active users, terminals, and login timestamps.


2. Power-User Example (Advanced)

For scripting and advanced diagnostics, use this configuration:

# Advanced
who -b -q

What it does: Shows the time of the last system boot (-b) and lists the total number of logged-in users (-q).


⚙️ Warning & Common Pitfalls

[!WARNING] Unlike w, who does not show current process CPU usage or idle time.


Here are some related posts on cli_tty1 you might want to check out: