{"id":606,"date":"2024-08-07T00:23:45","date_gmt":"2024-08-07T00:23:45","guid":{"rendered":"https:\/\/webhostingdelhi.net.in\/tutorials\/?p=606"},"modified":"2024-08-07T00:25:09","modified_gmt":"2024-08-07T00:25:09","slug":"sync-server-time-in-almalinux","status":"publish","type":"post","link":"https:\/\/webhostingdelhi.net.in\/tutorials\/sync-server-time-in-almalinux\/","title":{"rendered":"How to quick sync server time in AlmaLinux"},"content":{"rendered":"\n<p>sync server time in AlmaLinux, Ensuring accurate server time is crucial for the proper functioning of various services and applications. <a href=\"https:\/\/www.webhostingdelhi.net.in\/vps-hosting-delhi\/\">In AlmaLinux, you can easily sync your server&#8217;s time<\/a> using the <code>timedatectl<\/code> command, a utility provided by systemd for querying and changing the system clock and its settings. This method leverages Network Time Protocol (NTP) to synchronize your server&#8217;s clock with global time servers. <\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>To sync server time in AlmaLinux using <code>timedatectl<\/code>, follow these steps:<\/h2><nav><ul><li class=\"\"><a href=\"#check-current-time-and-timezone\">Check Current Time and Timezone:<\/a><\/li><li class=\"\"><a href=\"#enable-network-time-synchronization\">Enable Network Time Synchronization:<\/a><\/li><li class=\"\"><a href=\"#verify-ntp-synchronization\">Verify NTP Synchronization:<\/a><\/li><li class=\"\"><a href=\"#change-timezone-optional\">Change Timezone (Optional):<\/a><\/li><li class=\"\"><a href=\"#sync-time-immediately\">Sync Time Immediately:<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"check-current-time-and-timezone\"><strong>Check Current Time and Timezone:<\/strong><\/h2>\n\n\n\n<p>You can check the current system time and timezone using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   timedatectl status<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"429\" height=\"271\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/Seti-time-in-Linux-edited.png\" alt=\"\" class=\"wp-image-610\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/Seti-time-in-Linux-edited.png 429w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/Seti-time-in-Linux-edited-300x190.png 300w\" sizes=\"auto, (max-width: 429px) 100vw, 429px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"enable-network-time-synchronization\"><strong>Enable Network Time Synchronization:<\/strong><\/h2>\n\n\n\n<p>To ensure that network time synchronization is enabled, use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   sudo timedatectl set-ntp true<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"verify-ntp-synchronization\"><strong>Verify NTP Synchronization:<\/strong><\/h2>\n\n\n\n<p>After enabling NTP, you can verify its status with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   timedatectl status<\/code><\/pre>\n\n\n\n<p>Look for the line <code>NTP synchronized: yes<\/code> to confirm that NTP is active.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/linux-timedatectl-command-featured-1024x512.webp\" alt=\"\" class=\"wp-image-607\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/linux-timedatectl-command-featured-1024x512.webp 1024w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/linux-timedatectl-command-featured-300x150.webp 300w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/linux-timedatectl-command-featured-768x384.webp 768w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/linux-timedatectl-command-featured.webp 1350w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"change-timezone-optional\"><strong>Change Timezone (Optional):<\/strong><\/h2>\n\n\n\n<p>If you need to change the server&#8217;s timezone, list available timezones:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   timedatectl list-timezones<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"308\" height=\"194\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/timedatectl-list-timezones.png-edited.webp\" alt=\"\" class=\"wp-image-612\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/timedatectl-list-timezones.png-edited.webp 308w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/timedatectl-list-timezones.png-edited-300x189.webp 300w\" sizes=\"auto, (max-width: 308px) 100vw, 308px\" \/><\/figure>\n<\/div>\n\n\n<p>Then set the desired timezone, for example, to set the timezone to <code>Asia\/Kolkata<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   timedatectl set-timezone Asia\/Kolkata<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sync-time-immediately\"><strong>Sync Time Immediately:<\/strong><\/h2>\n\n\n\n<p>If you want to sync server time in AlmaLinux immediately after enabling NTP, you can restart the <code>systemd-timesyncd<\/code> service:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  systemctl restart systemd-timesyncd<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"512\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/Visual-depiction-of-a-Linux-terminal-with-the-process-of-installing-the-ntpdate-command-used-for-synchronizing-the-system-clock-with-an-NTP-server.jpg\" alt=\"sync server time in AlmaLinux\" class=\"wp-image-613\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/Visual-depiction-of-a-Linux-terminal-with-the-process-of-installing-the-ntpdate-command-used-for-synchronizing-the-system-clock-with-an-NTP-server.jpg 512w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/Visual-depiction-of-a-Linux-terminal-with-the-process-of-installing-the-ntpdate-command-used-for-synchronizing-the-system-clock-with-an-NTP-server-300x300.jpg 300w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/08\/Visual-depiction-of-a-Linux-terminal-with-the-process-of-installing-the-ntpdate-command-used-for-synchronizing-the-system-clock-with-an-NTP-server-150x150.jpg 150w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n<\/div>\n\n\n<p>By following these steps, you will have sync server time in AlmaLinux using <code>timedatectl<\/code> on AlmaLinux. The <code>timedatectl<\/code> tool provides an easy way to manage time settings on systemd-based systems like AlmaLinux.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sync server time in AlmaLinux, Ensuring accurate server time is crucial for the proper functioning of various services and applications. In AlmaLinux, you can easily sync your server&#8217;s time using the timedatectl command, a utility provided by systemd for querying and changing the system clock and its settings. This method leverages Network Time Protocol (NTP) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":616,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[59],"class_list":["post-606","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-command","tag-how-to-quick-sync-server-time-in-almalinux"],"_links":{"self":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/comments?post=606"}],"version-history":[{"count":2,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/606\/revisions"}],"predecessor-version":[{"id":617,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/606\/revisions\/617"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/media\/616"}],"wp:attachment":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/media?parent=606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/categories?post=606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/tags?post=606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}