Show recent system reboot history
Build a paste-ready command, then review its compatibility and effects before running it.
last reboot | head -10read-onlyno known side effects Compatibility
Linux + macOSVerified for Linux, macOS using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementslastlast must be installed and available on PATH.
Version supportlast Current supported releasesVerified for linux, macos using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsreboot system boot 6.8.0-63-generic Wed Jul 11 07:28 still runningRepresentative successful output; values vary with the selected target and system state.
Known errorslast: command not foundlast is missing or is not available on PATH.
Verifylast reboot | head -10The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01lastCommandRuns the last stage of this one-liner.
02rebootArgumentPasses reboot to last.
03|PipelinePasses the output on the left to the command on the right.
04headCommandRuns the head stage of this one-liner.
05-10OptionConfigures head with the -10 option.
Example input
last reboot | head -10
Example output
reboot system boot 6.8.0-63-generic Wed Jul 11 07:28 still running
reboot system boot 6.8.0-62-generic Mon Jun 23 06:14 - 07:27 (18+01:13)
reboot system boot 6.8.0-60-generic Fri May 30 09:02 - 06:13 (23+21:11)
Illustrative output — exact values vary by system and data.
Official sources