Linux hwclock display and setting hardware clock command details

  

hwclock(hardware clock)

Function description: Display and set hardware clock.

Syntax: hwclock [--adjust][--debug][--directisa][--hctosys][--show][--systohc][--test] [--utc][ ,null,null,3],--version][--set --date=<date and time>]

Note: There are two kinds of clocks, such as hardware clock and system clock, in Linux. The hardware clock refers to the clock device on the motherboard, which is the clock that can usually be set on the BIOS screen. The system clock is the clock in the kernel. When Linux boots, the system clock reads the hardware clock settings, and the system clock runs independently. All Linux related instructions and functions are settings that read the system clock.

Parameters:

–adjust hwclock is recorded in the /etc/adjtime file each time the hardware clock is changed. Using the –adjust parameter, hwclock can estimate the deviation of the hardware clock based on previous records and use it to correct the current hardware clock. –debug Displays detailed information about hwclock execution. –directisa hwclock presets to access the hardware clock from the /dev/rtc device. If it is not accessible, this parameter can be used to directly access the hardware clock with I/O instructions. –hctosys adjusts the system clock to match the current hardware clock. –set –date=<date and time> Set the hardware clock. –show Displays the time and date of the hardware clock. –systohc adjusts the hardware clock to match the current system clock. –test tests the program only, without actually changing the hardware clock. –utc To use Greenwich Mean Time, please include this parameter and hwclock will perform the conversion work. –version displays version information.

Copyright © Windows knowledge All Rights Reserved