Latest web development tutorials

Linux hwclock command

Linux command Daquan Linux command Daquan

Linux hwclock command is used to display and set the hardware clock.

Hardware and system clocks and other two clock in Linux. It refers to the hardware clock on the motherboard clock device, which is usually set in the BIOS screen clock. The system clock refers to the kernel clock. When Linux boots, the system clock is set to read the hardware clock, after the system clock that is independent. All Linux-related commands and functions are read to set the system clock.

grammar

hwclock [--adjust][--debug][--directisa][--hctosys][--show][--systohc][--test]
[--utc][--version][--set --date=<日期与时间>]

Parameters:

  • --adjust hwclock each time you change the hardware clock, will be recorded in / etc / adjtime file. Use --adjust parameters can hwclock based on previous records to estimate the deviation hardware clock, and used to correct the current hardware clock.
  • hwclock --debug display execution detailed information.
  • --directisa hwclock presets from / dev / rtc device to access the hardware clock. If not access, use this parameter to direct I / O instructions to access the hardware clock.
  • --hctosys the system clock is adjusted to be consistent with the current hardware clock.
  • --set --date = <Date and Time> Set the hardware clock.
  • --show to display the time and date of the hardware clock.
  • --systohc hardware clock is adjusted to be consistent with the current system clock.
  • --test only test program, but does not actually change the hardware clock.
  • --utc To use Greenwich Mean Time, add this parameter, hwclock will perform the conversion work.
  • --version display version information.

Examples

Displays 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 Daquan Linux command Daquan