HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

hwclock — Read or change the hardware clock. More information: <https://manned.org/hwclock>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecommandhardwarereadclichangeclockhwclock
linux

Problem

How to use the hwclock command: Read or change the hardware clock. More information: <https://manned.org/hwclock>.

Solution

hwclock — Read or change the hardware clock. More information: <https://manned.org/hwclock>.

Display the current time as reported by the hardware clock:
sudo hwclock


Write the current software clock time to the hardware clock (sometimes used during system setup):
sudo hwclock {{[-w|--systohc]}}


Write the current hardware clock time to the software clock:
sudo hwclock {{[-s|--hctosys]}}

Code Snippets

Display the current time as reported by the hardware clock

sudo hwclock

Write the current software clock time to the hardware clock (sometimes used during system setup)

sudo hwclock {{[-w|--systohc]}}

Write the current hardware clock time to the software clock

sudo hwclock {{[-s|--hctosys]}}

Context

tldr-pages: linux/hwclock

Revisions (0)

No revisions yet.