010-100 · Question #45
With which command can you determine the time of the last restart of a system?
The correct answer is E. last reboot. The 'last reboot' command reads the system wtmp log and displays a history of system reboots, including the most recent one.
Question
With which command can you determine the time of the last restart of a system?
Options
- Acurrent reboottime
- Bfind reboot
- Cexpect --reboot
- Dlast | reboot
- Elast reboot
How the community answered
(42 responses)- A2% (1)
- C10% (4)
- D5% (2)
- E83% (35)
Why each option
The 'last reboot' command reads the system wtmp log and displays a history of system reboots, including the most recent one.
'current reboottime' is not a valid Linux command and does not exist on standard systems.
'find reboot' is not a valid command syntax; 'find' is used for locating files by attributes, not querying system uptime records.
'expect --reboot' is not a valid usage; 'expect' is a scripting tool for automating interactive programs, not for querying reboot history.
'last | reboot' pipes the output of 'last' into 'reboot', which would attempt to restart the system, not display reboot history.
The 'last' command reads /var/log/wtmp and displays login/reboot records. When given 'reboot' as an argument, it filters output to show only reboot events, including the timestamp of each. This is the standard Linux method for determining when the system was last restarted.
Concept tested: Using 'last reboot' to view system restart history
Source: https://man7.org/linux/man-pages/man1/last.1.html
Topics
Community Discussion
No community discussion yet for this question.