Set the system timezone to Asia/Tokyo on a systemd system.
Which command is appropriate?
timedatectl set-timezone ZONE changes the system timezone using an IANA identifier.
Detailed explanation
timedatectl set-timezone Asia/TokyoCorrect. It changes the system timezone to Asia/Tokyo.
Correct. It changes the system timezone to Asia/Tokyo.
timedatectl timezone=Asia/TokyoIncorrect. This is not the timedatectl subcommand syntax.
Incorrect. This is not the timedatectl subcommand syntax.
date --timezone Asia/TokyoIncorrect. date does not persistently change the system timezone this way.
Incorrect. date does not persistently change the system timezone this way.
locale set TZ Asia/TokyoIncorrect. locale is not the system timezone configuration interface.
Incorrect. locale is not the system timezone configuration interface.
Try it yourself
An example you can run in a temporary verification environment.
timedatectl --help 2>&1 | grep 'set-timezone' | head -n 1Expected result
set-timezone ZONEのhelp行Key points
- set-timezone subcommand
- IANA identifier
- System-wide change
Notes
- Environment: systemd timedatectl 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.