Forrest logo
back to the hwclock tool

hwclock:tldr:ed5ea

hwclock: Write the current software clock time to the hardware clock (sometimes used during system setup).
$ hwclock --systohc
try on your machine

The command "hwclock --systohc" is used to synchronize the hardware clock of a computer system with the system's current system time.

The hardware clock, often referred to as the Real-Time Clock (RTC) or the CMOS clock, is a special clock that keeps track of the time even when the computer is turned off. It is different from the system time which is managed by the operating system.

The "--systohc" option tells the "hwclock" command to update the hardware clock based on the current system time. In other words, it sets the hardware clock to the same time as the system time.

This command is commonly used in Linux systems to ensure that the hardware clock is accurate and in sync with the system time. It is often executed during the system startup or shutdown process, as well as in regular system maintenance tasks.

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 hwclock tool