{"id":91,"date":"2021-07-05T07:54:25","date_gmt":"2021-07-05T07:54:25","guid":{"rendered":"http:\/\/webhostingpune.co.in\/blog\/?p=91"},"modified":"2021-07-05T07:54:27","modified_gmt":"2021-07-05T07:54:27","slug":"sync-linux-system-clock-with-a-remote-ntp-server","status":"publish","type":"post","link":"https:\/\/webhostingpune.co.in\/blog\/sync-linux-system-clock-with-a-remote-ntp-server\/","title":{"rendered":"Sync Linux System Clock with a Remote NTP Server"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>NTP<\/strong>\u00a0stands for\u00a0<strong>Network Time Protocol<\/strong>\u00a0is an internet protocol, which is used to synchronize the system clock between computers. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please note that you must have\u00a0<strong>NTP<\/strong>\u00a0installed on the system to enable automatic time synchronization with NTP servers.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Start by using timedatectl to find if the network time synchronization (NTP) service is active and your system clock synchronized:<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"612\" height=\"203\" src=\"http:\/\/webhostingpune.co.in\/blog\/wp-content\/uploads\/2021\/07\/image-6.png\" alt=\"\" class=\"wp-image-92\" srcset=\"https:\/\/webhostingpune.co.in\/blog\/wp-content\/uploads\/2021\/07\/image-6.png 612w, https:\/\/webhostingpune.co.in\/blog\/wp-content\/uploads\/2021\/07\/image-6-300x100.png 300w\" sizes=\"auto, (max-width: 612px) 100vw, 612px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Configuring NTP :<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the set-ntp argument to enable or disable automatic synchronization of your system clock with a remote server over the Network Time Protocol (NTP). Use the following command to enable this feature:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># timedatectl set-ntp yes or # <span style=\"background-color: inherit; font-size: inherit;\">timedatectl set-ntp 0<\/span> or # timedatectl set-ntp true<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following command to disable this automatic synchronization over NTP:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># timedatectl set-ntp no or # timedatectl set-ntp 1 or # timedatectl set-ntp false<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If using a service like chrony or ntpd to make changes, these are not shown by timedatectl until\u00a0<code>systemd-timedated<\/code>\u00a0is restarted:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># systemctl restart systemd-timedated<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NTP\u00a0stands for\u00a0Network Time Protocol\u00a0is an internet protocol, which is used to synchronize the system clock between computers. Please note that you must have\u00a0NTP\u00a0installed on the system to enable automatic time synchronization with NTP servers. Configuring NTP : Use the set-ntp argument to enable or disable automatic synchronization of your system clock with a remote server over the Network Time Protocol (NTP). Use the following command to enable this feature: Use the following command to disable this automatic synchronization over NTP: If using a service like chrony or ntpd to make changes, these are not shown by timedatectl until\u00a0systemd-timedated\u00a0is restarted:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":1,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":93,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts\/91\/revisions\/93"}],"wp:attachment":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}