Linux timedatectl Command: Check Time Zone and Time Synchronization

timedatectl checks the current time, time zone, hardware clock, and network time synchronization status of a systemd system. If necessary, it can also change the time zone or synchronization settings.

What is the timedatectl command?

The system time and the real-time clock (RTC) are different clocks. In status, you can see the local/UTC time, time zone, and synchronization status together. Since the provided synchronization services and policies may vary by distribution, do not infer the entire network connection based only on the displayed status.

Basic syntax

timedatectl [command] [argument]

The installed implementation and options may vary depending on the distribution. Check the description for your current system with man timedatectl.

Examples

Time and synchronization status

Check the display related to the current time zone and NTP synchronization.

timedatectl status

Finding available time zones

Confirm the exact time zone name before setting it.

timedatectl list-timezones

Change Time Zone

Check the time zone that complies with organizational policies, then set it.

sudo timedatectl set-timezone Asia/Seoul

Reading Time Zone and Synchronization Status

timedatectl shows local time, UTC time, time zone, and NTP synchronization status together. The following safely checks both the time zone and synchronization status.

timedatectl show -p Timezone -p NTPSynchronized

Example output:

Timezone=Asia/Seoul
NTPSynchronized=yes

NTPSynchronized=yes means that the system reports the time as synchronized, but it is not a complete diagnosis that all network time servers are functioning correctly. If the item is missing or no, check the distribution's time synchronization service and network status. Changing the time zone alters the display output, but it does not change the absolute time based on UTC.

Main Options and Format

Options/Format Description
status Displays the current time and time settings.
list-timezones Lists the names of time zones that can be set.
set-timezone region/city Changes the system time zone.
set-ntp true|false Turns supported network time synchronization on or off.
show Displays the configuration properties in machine-readable format.

Precautions when using

Changing the time zone can affect log display and the interpretation of scheduled tasks. Adjusting the clock directly with set-time can conflict with synchronization services, so check the NTP status first. After making changes, verify the result with timedatectl status and revert to the previous time zone if necessary.

Frequently Asked Questions

Will changing only the time zone also change the actual time?

It changes the local time representation that shows the same time. This is different from changing the actual point in time based on UTC.

Official Documentation

You can check the exact behavior of the options and implementation differences in the official documentation for timedatectl.

More in This Category
Linux df Command: Check Filesystem Free Space

Linux df Command: Check Filesystem Free Space

Learn how to check Filesystem Free Space with the Linux df command, including practical examples, key options, and important precautions.

Linux tail Command: View the End of a File and Follow Logs

Linux tail Command: View the End of a File and Follow Logs

Learn how to use the Linux tail command to view the last lines of a file and follow log updates in real time, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux jobs Command: List Jobs in the Current Shell

Linux jobs Command: List Jobs in the Current Shell

Learn how to list Jobs in the Current Shell with the Linux jobs command, including practical examples, key options, and important precautions.

Linux cat Command: Display and Concatenate File Contents

Linux cat Command: Display and Concatenate File Contents

Learn how to use the Linux cat command to display text files, concatenate multiple files, number lines, reveal hidden characters, and avoid unsafe redirection mistakes.

Linux id Command: Show User and Group IDs

Linux id Command: Show User and Group IDs

Learn how to show User and Group IDs with the Linux id command, including practical examples, key options, and important precautions.

Linux dpkg Command: Inspect and Install Local DEB Packages

Linux dpkg Command: Inspect and Install Local DEB Packages

Learn how to inspect and Install Local DEB Packages with the Linux dpkg command, including practical examples, key options, and important precautions.

Linux tee Command: Display and Save Pipeline Output

Linux tee Command: Display and Save Pipeline Output

Learn how to display and Save Pipeline Output with the Linux tee command, including practical examples, key options, and important precautions.

A History of Linux: From a 1991 Hobby Project to Global Infrastructure

A History of Linux: From a 1991 Hobby Project to Global Infrastructure

Trace the history of Linux from Unix and the GNU Project through the first Linux kernel, distributions, enterprise adoption, cloud computing, containers, and modern infrastructure.

Linux mount Command: Inspect and Mount Filesystems

Linux mount Command: Inspect and Mount Filesystems

Learn how to inspect and Mount Filesystems with the Linux mount command, including practical examples, key options, and important precautions.

Linux top Command: Monitor Processes in Real Time

Linux top Command: Monitor Processes in Real Time

Learn how to monitor Processes in Real Time with the Linux top command, including practical examples, key options, and important precautions.