How do you display a list of currently logged-in users?

Prepare for the LPI Linux Essentials 010-160 Test. Study with flashcards and multiple choice questions, each question offers hints and explanations. Get ready to ace your exam!

The 'who' command is used to display a list of currently logged-in users on a Linux system. When you execute this command, it provides detailed information about each user session, including the username, terminal, login time, and the originating IP address or hostname if applicable. This makes it particularly useful for administrators and users who want to monitor active sessions on the system.

The other commands serve different purposes. For instance, 'whoami' displays the username of the current user executing the command, rather than a list of all logged-in users. The 'login' command is typically used to initiate a user session and is not for displaying information about current logins. The 'users' command does list logged-in users but in a simpler format, showing only the usernames and not additional details like where or when they logged in. Thus, while 'users' can also provide a list of logged-in users, it does so without the context that 'who' provides, which is why 'who' is a more appropriate choice for displaying comprehensive information about logged-in users.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy