The Hardware Clock

Computer motherboards all contain a small battery that is used to power the hardware clock. This ensures that the computer can successfully keep track of the time even when it is powered off. In Linux, you can configure this hardware clock and synchronize your system clock to it (or vice versa). The importance of the hardware clock has been somewhat minimized with the widespread use of NTP and easily available, reliable time servers. However, for systems that aren’t always connected to the Internet, an accurate hardware clock is an important thing to have. Syncing a hardware clock is also required when working with old hardware that suffers from time issues, such as BIOSes that are not Y2K-aware.

Hardware clocks can suffer from the same drifts that system clocks experience, causing them to slowly lose (or gain) time over a certain period. The hwclock command is used in Linux to control the hardware clock.

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.