How to list currently logged-in users and their location

A system administrator should know who is on the system at any particular time. We can find the list of users currently logged in the system and their geographical locations through command easily.

Command to list currently logged-in users:

The command is used in the / Unix to see the list of users currently logged in the system, it shows what does the users currently doing.

The w command shows the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

This information is displayed for each user: login name, the tty name, the remote host they are logged in from, the amount of time they have been logged into the system, their idle time of the system, JCPU, PCPU, and the command line of their current process.

The JCPU time is the time attached to the tty which is used by all the processes, but it does not include any currently running background jobs. The PCPU time is the time used by the current process, named in the “What” field.

Tags: ,

Leave a Reply

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