How To Install Hwclock In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Hwclock In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

hwclock

Used for reading or changing the hardware clock. Usually requires root.

Maintainer: LaMont Jones


Section: utils

Install hwclock

  • Debian apt-get install util-linux Click to copy
  • Ubuntu apt-get install util-linux Click to copy
  • Alpine OS apk add util-linux Click to copy
  • Arch Linux pacman -S util-linux Click to copy
  • Kali Linux apt-get install util-linux Click to copy
  • CentOS yum install util-linux Click to copy
  • Fedora dnf install util-linux Click to copy
  • Raspbian apt-get install util-linux Click to copy
  • macOS brew install util-linux Click to copy

Used for reading or changing the hardware clock. Usually requires root.

How to use hwclock?

Below are few example commands for hwclock that you can use in the terminal.

Display the current time as reported by the hardware clock:
hwclockClick to copy
Write the current software clock time to the hardware clock (sometimes used during system setup):
hwclock --systohcClick to copy
Write the current hardware clock time to the software clock:
hwclock --hctosysClick to copy
Install the latest version of hwclock in Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS from terminal. To install the hwclock just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of hwclock from the respository and install it in your computer/server.