Which command is used to determine which users have logged into the system?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

Which command is used to determine which users have logged into the system?

Explanation:
To find out which accounts have accessed the system, you want a per-user login history. The lastlog tool reads the last login time for every account from the system’s lastlog record and prints a line for each user, showing the most recent login (or indicating that never logged in). This gives a complete view of which users have ever logged in. It differs from who, which shows only users currently logged in; from w, which also shows current activity; and from last, which presents recent login events in sequence rather than a full per-user last-login snapshot. So lastlog is the right choice for listing which users have logged into the system.

To find out which accounts have accessed the system, you want a per-user login history. The lastlog tool reads the last login time for every account from the system’s lastlog record and prints a line for each user, showing the most recent login (or indicating that never logged in). This gives a complete view of which users have ever logged in. It differs from who, which shows only users currently logged in; from w, which also shows current activity; and from last, which presents recent login events in sequence rather than a full per-user last-login snapshot. So lastlog is the right choice for listing which users have logged into the system.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy