RHEL Linux - Red Hat System Administration Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the RHEL Linux - Red Hat System Administration Exam. Enhance your knowledge with flashcards and multiple-choice questions, complete with hints and explanations. Prepare for your certification!

Practice this question and more.


What Linux command would you use to check the current users logged into the system?

  1. whoami

  2. logged_users

  3. who

  4. users

The correct answer is: who

The command to check the current users logged into the system is "who." This command provides detailed information about users currently logged in, including their usernames, terminal details, and the time they logged in. It displays a list of all active user sessions on the machine, making it particularly useful for system administrators who need to monitor user activity. In contrast, "whoami" displays only the username of the current user executing the command, which does not provide information about other users on the system. "logged_users" is not a standard command in Linux, and therefore, cannot be used effectively. The command "users" provides a simplified list of currently logged-in users but does not include additional session details like login time or terminal information. Therefore, "who" stands out as the most comprehensive and informative option for checking currently logged-in users.