During boot, read the hardware clock and apply it to the system clock.
Which command is appropriate?
--hctosys copies hardware-clock time to the system clock.
Detailed explanation
hwclock --systohcIncorrect. --systohc writes in the opposite direction.
Incorrect. --systohc writes in the opposite direction.
hwclock --showIncorrect. --show only displays the RTC.
Incorrect. --show only displays the RTC.
hwclock --hctosysCorrect. --hctosys reads the RTC and sets system time.
Correct. --hctosys reads the RTC and sets system time.
timedatectl set-ntp trueIncorrect. set-ntp enables synchronization rather than directly reading the RTC.
Incorrect. set-ntp enables synchronization rather than directly reading the RTC.
Try it yourself
An example you can run in a temporary verification environment.
hwclock --help 2>&1 | grep -- '--hctosys' | head -n 1Expected result
--hctosysのhelp行Key points
- RTC to system
- Opposite of systohc
- Changes state
Notes
- Environment: util-linux hwclock helpの読取のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.