![Forrest logo](/images/logo.png)
reboot:tldr:2462a
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.