How to List Current Logged-In Users on Linux
If you are new to Linux, you may be wondering how to check if anyone else is using your system. Checking the list of currently logged-in users is a fairly simple task and, in this article, we will guide you through the process of how to list current logged-in users on Linux.
There are several ways to view the list of currently logged-in users in Linux, but we will cover the two most basic methods.
Method 1: Using the who command
The who command is one of the simplest and most commonly used commands to check which users are currently logged in to a Linux server. To use the who command, simply open the terminal and type in the following command:
“`
who
“`
This will display a list of all the currently logged-in users, along with their login and logout times, as well as the IP address they are connected from.
Method 2: Using the w command
The w command is similar to the who command but provides more detailed information about the logged-in users. To use the w command, open the terminal and type in the following command:
“`
w
“`
This command will show you a list of all the currently logged-in users on your system. In addition to the login and logout times, the w command also shows a number of other useful details such as the user’s terminal, the uptime, CPU usage, and more.
Both of these methods are simple ways to check who is currently logged in to your Linux system.