in

LinuxLinux

How to View Logged Users in Ubuntu Linux?

Linux Command to View Logged Users!

View Logged Users in Linux

V

iew logged users in Ubuntu: You can easily check the number of users logged in to your Linux PC. In this article, we provided the essential Linux Commands to check the logged users! Lets get into the article.

Jump To:

View Logged Users Command in Linux:

There are many Linux commands available to view the logged users in Linux and they are:

  • users
  • last -a
  • who -u
  • whoami

users command to view logged users in Linux:

You can use the users command to view the logged users list. To do follow the instructions.

  • Open the terminal
  • Copy the below command
$users
  • Paste the command and execute to view the logged users in your Linux PC.
Users Command in Linux
Users Command in Linux

last -a command to view logged users in Linux:

The last -a command will print the details of the users who logged previously. To do follow the instructions,

  • Open the terminal
  • Copy the below command
$last -a
  • Paste the command and execute to view the logged users in your Linux PC.
last -a command in Linux
last -a command in Linux

From the above image, the last -a command displays the list of users that logged in to your Linux PC.

who -u command to view logged users in Linux:

who -u is also a type of Linux command to display the currently logged user details in Linux PC. To do follow the instructions:

  • Open the terminal
  • Copy the below command
$who -u
  • Paste the command and execute it to view the currently logged user.
Check this too  10 Interesting Usages of "!" Operator in Linux Commands
who -u command in Linux
who -u command in Linux

From the above image, who -u command displays the currently logged user details in Linux.

whoami command to view logged users in Linux:

whoami command will display the currently logged user in Linux PC. To do follow the instructions:

  • Open the terminal
  • Copy the below command
$whoami
  • Paste the command and execute it to view the logged users.
whoami command in Linux
whoami command in Linux

This is how you can use the whoami command to view the currently logged user in Linux.

Verdict:

That’s it. The above commands are the powerful and essential Linux commands to display logged users’ data. If you have any queries related to this article and then feel free to comment us below or ask us a question in our Forum

Article Review
  • Article Explanation
  • Commands Provided
  • Images Explanation
  • Content Deapth
4.8

Summary

Want more tutorials? Kindly visit to our HomePage

Leave a Reply

Your email address will not be published. Required fields are marked *

Written by Rachel

I'm Rachel, From Arizona. Am playing the "Content Management" Role in Tec Robust. I started working in TR from Jan 2019. Big Marvel Fan.

Contact me:
tecrobust [@] gmail.com
Sub: Message to Rachel

Install Virtualbox 6.0 on Ubuntu

Install VirtualBox 6.0 on Ubuntu 18.04 & 19.04 Disco Dingo {Linux}

How to Install & Use Megatools in Ubuntu 18.04,19.04 & 19.10?