Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the w command of linux to display logged in users

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Do not know how to use linux's w command to display logged-in users? In fact, it is not difficult to solve this problem. Let the editor take you to learn how to solve it. I hope you will gain a lot after reading this article.

The W command is used to display a list of users who have logged in to the system and to display the instructions that the user is executing. Execute this command to know who are currently logged in to the system and the programs they are executing. Executing the w command alone displays all users, or you can specify a user name to display only information about a user.

Syntax format: W [parameters]

Commonly used parameters: coach

-h/--no-header does not print header information-u/--no-current ignores username when displaying current process and cpu time-s/--short uses short output format-f/--from shows where the user logs in-o/--old-style old output-i/--ip-addr displays IP address instead of hostname (if possible)-help displays this help and exits-V/--version displays version information

Reference example

Displays the user information that is currently logged in to the system:

[root@linuxcool ~] # w

Do not print header information:

[root@linuxcool] # w-h

Show where the user logged in:

[root@linuxcool] # w-f

Use the short output format:

[root@linuxcool] # w-s Thank you for reading this article carefully. I hope the editor will share and use the w command of linux to show the content of logged-in users. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report