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:
- Display information about all users:
w
- Display information about a specific user:
w username
- Display information in a specific format:
w -h
The -h
option turns off the display of headers and footers.
- 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