Linux / Unix: w Command Examples

The “w” command in Linux/Unix displays information about the users who are currently logged into the system, and what they are doing. Here are some examples of using the “w” command:

  1. Display information about all users:
w
  1. Display information about a specific user:
w username
  1. Display information in a specific format:
w -h

The -h option turns off the display of headers and footers.

  1. Display information about users who are logged in, but don’t show their idle time:
w -i

These are some basic examples of using the “w” command. For more options and information, you can refer to the manual page by running the following command:

man w

Leave a Comment