Linux Comm Hwclock
# Linux hwclock Command
[ Linux Command Reference](#)
The Linux hwclock command is used to display and set the hardware clock.
In Linux, there are two types of clocks: the hardware clock and the system clock. The hardware clock refers to the clock device on the motherboard, which is the clock that can typically be configured in the BIOS screen. The system clock refers to the clock inside the kernel. When Linux boots, the system clock reads the hardware clock settings, after which the system clock operates independently. All Linux-related commands and functions read the system clock settings.
### Syntax
hwclock
**Parameters**:
* --adjust Each time hwclock changes the hardware clock, it records the change in the /etc/adjtime file. Using the --adjust parameter allows hwclock to estimate the hardware clock's deviation based on previous records and use it to correct the current hardware clock.
* --debug Displays detailed information during hwclock execution.
* --directisa By default, hwclock accesses the hardware clock through the /dev/rtc device. If access fails, this parameter can be used to directly access the hardware clock via I/O instructions.
* --hctosys Adjusts the system clock to match the current hardware clock.
* --set --date= Sets 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 Only tests the program without actually changing the hardware clock.
* --utc Add this parameter if you want to use Greenwich Mean Time (GMT); hwclock will perform the conversion.
* --version Displays version information.
### Examples
Display the current time
# hwclock
2010May 27, Thursday, 18:04:31 -0.704214 seconds
View version information
# hwclock -v
hwclock from util-linux-2.12a
[ Linux Command Reference](#)
[](#)(#)
(#)[](#)
YouTip