Which command is used to see which users logged in most recently?

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

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command used to see which users logged in most recently is "last." This command retrieves information from the system's login records, specifically from the /var/log/wtmp file, which records all login and logout events. When executed, "last" displays a list of users who have logged into the system, including their usernames, the terminal from which they logged in, the IP address or hostname (if applicable), and the timestamps of their login sessions, sorted by the most recent logs first. This is particularly useful for tracking user activity and monitoring system access.

Other commands serve different purposes: "who" shows the currently logged-in users without historical data, "users" lists the usernames of users who are logged in at that moment, and "finger" provides information about users on the system, but usually includes their login status and general information rather than a historical account of logins. Thus, "last" is the appropriate choice for viewing recent login activity.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy