Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux hwclock command

Linux hwclock command

Linux Command Reference 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 usually the clock that can be set in the BIOS screen. The system clock refers to the clock in the kernel. When Linux starts, the system clock reads the hardware clock's settings, after which the system clock operates independently. All Linux-related commands and functions read the system clock's settings.

Syntax

hwclock [--adjust][--debug][--directisa][--hctosys][--show][--systohc][--test]

[--utc][--version][--set --date=<日期与时间>]

Parameters:

Example

Display the current time



# hwclock 

2010年05月27日 星期四 18时04分31秒 -0.704214 seconds

View version information



# hwclock -v

hwclock from util-linux-2.12a

Linux Command Reference Linux Command Reference