010-160 · Question #9
Which of the following outputs could stem from the command last?
The correct answer is E. root pts/0 192.168.1.1 Mon Feb 3 10:48 still logged in. The last command reads /var/log/wtmp to display a history of user logins, showing username, terminal, source IP, date/time, and session status.
Question
Options
- A/ is
- Bcd text.txt
- Clogout
- Dreboot system boot 4.15.0-60-generic Mon Feb 3 09:20 - 11:39 (02:19)
- Eroot pts/0 192.168.1.1 Mon Feb 3 10:48 still logged in
How the community answered
(57 responses)- A5% (3)
- B2% (1)
- D2% (1)
- E91% (52)
Why each option
The `last` command reads /var/log/wtmp to display a history of user logins, showing username, terminal, source IP, date/time, and session status.
'/ is' resembles a fragment of `ls /` filesystem listing output, not any field produced by the `last` command.
'cd text.txt' is a shell command invocation typed by a user, not output generated by any Linux command.
'logout' alone is not a complete output line from `last`; logout events appear as part of a full record containing username, terminal, host, login time, and logout time.
Although `last` does display reboot pseudo-entries, this option's format embedding the kernel version string does not represent a user-session login record, which is the primary output type the question targets.
The entry 'root pts/0 192.168.1.1 Mon Feb 3 10:48 still logged in' matches the exact columnar format that `last` produces: username, pseudo-terminal, source IP or hostname, login timestamp, and session status. The 'still logged in' field is the standard indicator `last` appends when a session has not yet terminated.
Concept tested: Interpreting output of the last login command
Source: https://man7.org/linux/man-pages/man1/last.1.html
Topics
Community Discussion
No community discussion yet for this question.