HostOnNet Blog

How to find Who is Logged-In on Your Linux System

Looking for Linux Server Admin or WordPress Expert? We can help.

Linux Commands.gif
As a system administrator, you may want to know who is on the system at any give point in time. You may also want to know what they are doing

w command is used to show logged-in user names and what they are doing. The information will be read from /var/run/utmp file. The output of the w command contains the following columns:

For each and every user who is logged on, it displays the following info:

Username
tty info
Remote host ip-address
Login time of the user
How long the user has been idle
JCPU and PCUP
The command of the current process the user is executing

Line 1 of the w command output is similar to the uptime command output. It displays the following:

Current time
How long the system has been up and running
Total number of users who are currently logged on the system
Load average for the last 1, 5 and 15 minutes


root@cloud1:~# w
 04:55:27 up 15:20,  1 user,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    111.92.103.122   04:49    0.00s  0.06s  0.00s w
root@cloud1:~#

About Annie

I've been working in Technical Section for over 10 years in a wide range of tech jobs from Tech Support to Software Testing. I started writing blog for my future reference and useful for all.

One Response to How to find Who is Logged-In on Your Linux System

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.