How to View all Logged-in Users on Linux

August 27, 2025 / Servers, Hosting & Email

This article explains how to utilise a variety of commands that show details like usernames, login times, and terminal sessions to examine all users who are currently logged in on Linux.

Follow the guide:

  1. Using the ‘who’ Command:
    This command displays all active sessions:

    who

    It lists logged-in users, their terminals, login time, and remote IP (if any).

  2. Using the ‘w’ Command
    This command offers more detailed information:

    w

    It displays the load average, system uptime, and the users’ logged-in identities and active processes.

  3. Using the ‘users’ Command
    The user’s command gives a simple list of logged-in usernames:

    users
  4. Using the ‘last’ Command
    The last command displays a history of user logins (not just current ones):

    last

    To see only currently logged-in users, pair it with ‘grep’:

    last -a | grep still
  5. As a best practice, use ‘who’ or ‘w’ for real-time login information, and ‘last’ to review historical login sessions.

In conclusion, these commands allow you to easily monitor and track all users currently logged into your Linux system.

Managing users on Linux systems?
Gain full control over users and sessions with a Linux VPS environment.

Want deeper insights into activity? Learn How to install and use the query monitor plugin

Spread the love