XK0-005 · Question #835
A Linux administrator needs to restart a server and wants to see if any users are currently connected to it. Which of the following commands should the administrator run to find this information?
The correct answer is C. w. To identify currently logged-in users on a Linux server before a restart, the administrator should use the w command.
Question
A Linux administrator needs to restart a server and wants to see if any users are currently connected to it. Which of the following commands should the administrator run to find this information?
Options
- Aman
- Bid
- Cw
- Dhost
How the community answered
(34 responses)- A6% (2)
- B3% (1)
- C88% (30)
- D3% (1)
Why each option
To identify currently logged-in users on a Linux server before a restart, the administrator should use the `w` command.
`man` is used to display manual pages for commands, not to list logged-in users.
`id` displays user and group identity information for a specified user or the current user, not a list of all logged-in users.
The `w` command displays information about the users currently logged in on the machine, including their login name, terminal, login time, idle time, JCPU, PCPU, and the command they are running. This provides a comprehensive overview of active sessions, making it suitable for checking user presence before a server restart.
`host` is a utility used for performing DNS lookups, not for checking user activity on a local server.
Concept tested: Linux command to list logged-in users
Source: https://man7.org/linux/man-pages/man1/w.1.html
Topics
Community Discussion
No community discussion yet for this question.