Display the RTC value without changing the system clock or hardware clock.
Which command is appropriate?
hwclock --show reads and displays the real-time clock without synchronizing either clock.
Detailed explanation
dateIncorrect. date displays the kernel system clock.
Incorrect. date displays the kernel system clock.
hwclock --showCorrect. --show reads the hardware clock.
Correct. --show reads the hardware clock.
hwclock --systohcIncorrect. --systohc writes the system clock to the RTC.
Incorrect. --systohc writes the system clock to the RTC.
hwclock --hctosysIncorrect. --hctosys copies the RTC into the system clock.
Incorrect. --hctosys copies the RTC into the system clock.
Try it yourself
An example you can run in a temporary verification environment.
hwclock --help | grep -E -- '--show'Expected result
hardware clockを表示する説明行Key points
- Read the RTC
- date shows system clock
- Distinguish synchronization options
Notes
- Environment: util-linux hwclock help / RTCアクセスなし
- 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.