How to show current logged in users in Linux

How to show current logged in users in Linux

To show the current logged-in users in Linux, you can use the who command. This command displays the login names, terminal names, and the time of login for each user currently logged in to the system.

To show the current logged-in users, simply run the who command:

r‮ot refe‬:lautturi.com
who

This will show the login names, terminal names, and the time of login for each user currently logged in to the system.

For example, the output might look something like this:

user1 pts/0        2021-01-01 12:34
user2 pts/1        2021-01-01 13:45
user3 pts/2        2021-01-01 14:56

This indicates that there are three users currently logged in: user1, user2, and user3. The pts/0, pts/1, and pts/2 are the terminal names, and the dates and times indicate the time of login.

You can also use the w command to show the current logged-in users. The w command displays similar information as the who command, but also shows the hostname and the command line of the user's current process.

To show the current logged-in users using the w command, run the following command:

w
Created Time:2017-10-29 22:08:38  Author:lautturi