How do you display all currently logged-in users in UNIX?

How do you display all currently logged-in users in UNIX?

a) who
b) w
c) users
d) All of the above

Answer:

d) All of the above

Explanation:

The who, w, and users commands can all be used to display information about logged-in users. The who command shows detailed information such as usernames, terminal names, login times, and more. It’s widely used for user tracking in multi-user systems.

The w command provides more detailed information, including what each user is currently doing, CPU usage, and the system load. It’s useful for system administrators who want to monitor system activity in real-time.

Meanwhile, the users command provides a simple list of logged-in usernames without any additional information. Each of these commands serves a different purpose, depending on the level of detail required.

Reference:

Top 50 Unix MCQ Questions & Answers

Scroll to Top