w command in Linux with Examples

w command in Linux Provides a quick summary of every user logged into a computer.

The w command in Linux provides information about currently logged-in users and their activities. It displays details such as the user’s username, terminal, remote host, login time, idle time, and the current command or process they are running.

w command in Linux with Examples

On the man page, the describes it

  • w – Show who is logged on and what they are doing.
  • man w– More details information.

w command in Linux with Examples

$ w

Executing the w command without any options will display a summary of logged-in users along with their activities. The output will include the following columns:

  1. USER: The username of the logged-in user.
  2. TTY: The terminal name or pseudo-terminal associated with the user.
  3. FROM: The remote host or IP address from which the user is logged in. If the user is logged in locally, this field displays the abbreviation “localhost” or the IP address “”.
  4. LOGIN@: The login time of the user.
  5. IDLE: The idle time, indicating how long the user has been inactive.
  6. JCPU: The total CPU time used by the user’s processes.
  7. PCPU: The CPU time used by the user’s current process.
  8. WHAT: The command or process currently being executed by the user.


command is a simple command in Linux. It is the most popular in-use terminal Linux Show who is logged on and what they are doing. The w command also provides additional options for customized output and filtering based on specific users or terminals.

You can refer to the w command manual (man w) for more information on these options. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

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.