Forrest logo
back to the reboot tool

reboot:tldr:2462a

reboot: Write the wtmp shutdown entry without rebooting the system.
$ reboot --wtmp-only
try on your machine

The command "reboot --wtmp-only" is used to reboot a system and update only the "wtmp" file.

The "reboot" command is used to restart or reboot a computer. It shuts down the system, terminates all processes, and then restarts the system. This command requires superuser or root privileges.

The addition of "--wtmp-only" option specifies that only the "wtmp" file should be updated. The "wtmp" file is a log file that records all user logins and logouts on a Unix-like system. It keeps track of login records, session durations, and other related information.

Using "reboot --wtmp-only" instead of just "reboot" ensures that the system restarts and updates the "wtmp" file without performing other unnecessary actions like executing system startup scripts or services. It's useful when you only want to refresh the "wtmp" file without affecting the rest of the system.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the reboot tool