hwclock

Used for reading or changing the hardware clock. Usually requires root. More information: <https://manned.org/hwclock>.

Install

All systems
curl cmd.cat/hwclock.sh
Debian Debian
apt-get install util-linux
Ubuntu
apt-get install util-linux
Alpine
apk add util-linux
Arch Arch Linux
pacman -S util-linux
image/svg+xml Kali Linux
apt-get install util-linux
CentOS
yum install util-linux
Fedora
dnf install util-linux
Windows (WSL2)
sudo apt-get update sudo apt-get install util-linux
OS X
brew install util-linux
Raspbian
apt-get install util-linux
Docker
docker run cmd.cat/hwclock hwclock powered by Commando

Used for reading or changing the hardware clock. Usually requires root. More information: <https://manned.org/hwclock>.

  • Display the current time as reported by the hardware clock:
    hwclock
  • Write the current software clock time to the hardware clock (sometimes used during system setup):
    hwclock --systohc
  • Write the current hardware clock time to the software clock:
    hwclock --hctosys

© tl;dr; authors and contributors