<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ntp Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/ntp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 18 May 2021 15:10:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>A NTP Server by installing Chrony on Ubuntu 20.04</title>
		<link>https://www.osradar.com/ntp-server-chrony-ubuntu/</link>
					<comments>https://www.osradar.com/ntp-server-chrony-ubuntu/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 21 May 2021 23:18:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[Focal Fossa]]></category>
		<category><![CDATA[ntp]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=30070</guid>

					<description><![CDATA[<p>Hello, friends. In this post, we’ll show you how to set up an NTP server by installing Chrony on Ubuntu 20.04 An NTP server is important because it allows all devices on a network to be synchronized via a clock. That is, they all have the same time and time zone. This may seem unimportant, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/ntp-server-chrony-ubuntu/">A NTP Server by installing Chrony on Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello, friends. In this post, we’ll show you how to set up an NTP server by installing Chrony on Ubuntu 20.04</p>



<p>An NTP server is important because it allows all devices on a network to be synchronized via a clock. That is, they all have the same time and time zone. This may seem unimportant, but the correct functioning of many services depends on proper time settings.</p>



<p>Now, there is a tool called Chrony that allows us to quickly deploy an NTP server.</p>



<p>According to the <a href="https://chrony.tuxfamily.org/">Chrony website</a>:</p>



<blockquote class="wp-block-quote"><p>Chrony is a versatile implementation of the Network Time Protocol (NTP). It can synchronize the system clock with NTP servers, reference clocks (e.g. GPS receiver), and manual input using wristwatch and keyboard. It can also operate as an NTPv4 (RFC 5905) server and peer to provide a time service to other computers in the network.</p></blockquote>



<p>Fortunately, it has good support for many Linux distributions and Ubuntu is no exception.</p>



<h2 id="chrony-on-ubuntu-20.04"><a href="#chrony-on-ubuntu-20.04" name="chrony-on-ubuntu-20.04"></a>Chrony on Ubuntu 20.04</h2>



<p>Before starting, the server must have the time zone set correctly.</p>



<p>So, open a terminal or connect via <a href="https://www.osradar.com/manages-ssh-connections-from-windows-10-with-putty/" target="_blank" rel="noreferrer noopener">SSH</a>.</p>



<pre class="wp-block-preformatted">sudo timedatectl set-timezone Europe/Berlin</pre>



<p>Replace <code>Europe/Berlin</code> with the correct timezone for your server.</p>



<p>To check the changes, run the command <code>timedatectl</code>.</p>



<p>Output:</p>



<pre class="wp-block-preformatted">               Local time: Wed 2021-05-12 21:13:11 CEST
           Universal time: Wed 2021-05-12 19:13:11 UTC 
                 RTC time: Wed 2021-05-12 19:13:12     
System clock synchronized: yes                         
              NTP service: active                      
                Time zone: Europe/Berlin (CEST, +0200) 
          RTC in local TZ: no </pre>



<p>Now we can install the <code>chrony</code> package from the official Ubuntu 20.04 repositories.</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt install chrony
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  systemd-timesyncd
The following NEW packages will be installed:
  chrony
0 upgraded, 1 newly installed, 1 to remove and 11 not upgraded.
Need to get 220 kB of archives.
After this operation, 290 kB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>



<p>The program is quite lightweight so the installation will take almost no time at all.</p>



<p>So, start the Chrony service and have it start with the system.</p>



<pre class="wp-block-preformatted">sudo systemctl start chronyd
sudo systemctl enable chronyd</pre>



<p>Check the status of the service</p>



<pre class="wp-block-preformatted">sudo systemctl status chronyd
● chrony.service - chrony, an NTP client/server
     Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-05-12 21:16:25 CEST; 1min 36s ago
       Docs: man:chronyd(8)
             man:chronyc(1)
             man:chrony.conf(5)
   Main PID: 1815 (chronyd)
      Tasks: 2 (limit: 2286)
     Memory: 1.0M
     CGroup: /system.slice/chrony.service
             ├─1815 /usr/sbin/chronyd -F -1
             └─1816 /usr/sbin/chronyd -F -1

May 12 21:16:25 osradar systemd[1]: Starting chrony, an NTP client/server...
May 12 21:16:25 osradar chronyd[1815]: chronyd version 3.5 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 -DEBUG)
May 12 21:16:25 osradar chronyd[1815]: Initial frequency -38.890 ppm
May 12 21:16:25 osradar chronyd[1815]: Loaded seccomp filter
May 12 21:16:25 osradar systemd[1]: Started chrony, an NTP client/server.
May 12 21:16:32 osradar chronyd[1815]: Selected source 2001:67c:1560:8003::c7
May 12 21:17:38 osradar chronyd[1815]: Selected source 2001:1600:4:1::123</pre>



<p>And you will know that the service is running correctly.</p>



<h3 id="configuring-chrony-on-ubuntu-20.04"><a href="#configuring-chrony-on-ubuntu-20.04" name="configuring-chrony-on-ubuntu-20.04"></a>Configuring Chrony on Ubuntu 20.04</h3>



<p>Now that we have the service installed, we need to configure it. The Chorny configuration file is <code>/etc/chrony/chrony.conf</code> which we need to modify but first make a backup of it.</p>



<pre class="wp-block-preformatted">sudo cp /etc/chrony/chrony/chrony.conf `/etc/chrony/chrony.conf.bak</pre>



<p>And now edit it:</p>



<pre class="wp-block-preformatted">sudo nano /etc/chrony/chrony.conf</pre>



<p>And set the nearest NTP servers</p>



<pre class="wp-block-preformatted">server [NTP server]</pre>



<p>Then save the changes and close the editor.</p>



<p>Now do the synchronization</p>



<pre class="wp-block-preformatted">sudo timedatectl set-ntp true</pre>



<p>After that, restart the Chrony service.</p>



<pre class="wp-block-preformatted">sudo systemctl restart chronyd</pre>



<p>Then, test the changes by checking the Chrony sources</p>



<pre class="wp-block-preformatted">chronyc sources</pre>



<p>Output</p>



<pre class="wp-block-preformatted">210 Number of sources = 8
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^- golem.canonical.com           2   6    37     5  +6082us[+6082us] +/-   54ms
^- chilipepper.canonical.com     2   6    67     3   +313us[ +313us] +/-   47ms
^- alphyn.canonical.com          2   6    37     5   +892us[ +892us] +/-  119ms
^+ pugot.canonical.com           2   6    37     4  +1452us[+1452us] +/-   71ms
^* 25000-021.cloud.services&gt;     2   6    37     6   +881us[  -83us] +/-   48ms
^- ns1.luns.net.uk               2   6    37     4  +2533us[+2533us] +/-   67ms
^+ 2a01:4f8:c2c:3d20::1          3   6    37     4  -1651us[-1651us] +/-   93ms
^+ time02.nevondo.com            2   6    37     4  +1028us[+1028us] +/-   43ms</pre>



<p>So, everything is correct.</p>



<p><strong>Note: I am uing the default server. In this output, you will see the server that you added.</strong></p>



<h2 id="configuring-the-chrony-client"><a href="#configuring-the-chrony-client" name="configuring-the-chrony-client"></a>Configuring the Chrony Client</h2>



<p>Now it’s time to do the client configuration. Regardless of the Linux distribution you use, you have to set the Timezone correctly.</p>



<pre class="wp-block-preformatted">sudo timedatectl set-timezone Europe/Berlin</pre>



<p>Proceed now to install the client on your distribution.</p>



<p>For example, on CentOS it would be</p>



<pre class="wp-block-preformatted">sudo dnf install chony</pre>



<p>Or on Debian based distributions:</p>



<pre class="wp-block-preformatted">sudo apt install chrony</pre>



<p>Next, you have to configure Chrony to serve the server you have configured.</p>



<pre class="wp-block-preformatted">sudo nano /etc/chrony/chrony.conf</pre>



<p>And add the Chrony server:</p>



<pre class="wp-block-preformatted">server chrony-server-ip</pre>



<p>Save the changes and close the editor. Now synchronise your computer with the created NTP server.</p>



<pre class="wp-block-preformatted">sudo timedatectl set-ntp true</pre>



<p>You can also verify the changes by running</p>



<pre class="wp-block-preformatted">chronyc sources</pre>



<p>So, enjoy it.</p>



<h2 id="conclusion"><a href="#conclusion" name="conclusion"></a>Conclusion</h2>



<p>An NTP server is a simple tool to set up but it will help you to keep everything in order on your network. This step is essential for many computer systems.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/ntp-server-chrony-ubuntu/">A NTP Server by installing Chrony on Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/ntp-server-chrony-ubuntu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to set up a NTP server on CentOS 7?</title>
		<link>https://www.osradar.com/how-to-set-up-a-ntp-server-centos-7/</link>
					<comments>https://www.osradar.com/how-to-set-up-a-ntp-server-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sat, 15 Dec 2018 02:33:20 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=8396</guid>

					<description><![CDATA[<p>In an organization, there are many administrative processes that need the registry to be correct. An essential field of the records is the date and time they are made. Therefore, it is necessary that all computers have synchronized the date and time. So, to do this it is necessary to configure an NTP server. NTP [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-set-up-a-ntp-server-centos-7/">How to set up a NTP server on CentOS 7?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In an organization, there are many administrative processes that need the registry to be correct. An essential field of the records is the date and time they are made. Therefore, it is necessary that all computers have synchronized the date and time. So, to do this it is necessary to configure an NTP server.</p>
<p><a href="http://www.ntp.org/" rel="noopener">NTP</a> (Network Time Protocol) is an Internet protocol for synchronizing the time and date of computer devices on a computer network. In addition, it uses port 123 of the UDP transport layer.</p>
<p>So, let&#8217;s set up an NTP server on <a href="https://www.osradar.com/centos-7-1810-available/" rel="noopener">CentOS 7</a>.</p>
<h1>1. Upgrade the system</h1>
<p>The first step in this tutorial is to update the system. This ensures that the security patches are properly installed on your system.</p>
<p>Access your server and run.</p>
<pre class="">:~$ su
:~# yum update</pre>
<p><figure id="attachment_8398" aria-describedby="caption-attachment-8398" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8398" src="https://www.osradar.com/wp-content/uploads/2018/12/1-9.png" alt="1.- Upgrade the system" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/1-9.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/1-9-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/1-9-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/1-9-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/1-9-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/1-9-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-8398" class="wp-caption-text">1.- Upgrade the system</figcaption></figure></p>
<p>So, that&#8217;s it. You can continue.</p>
<h1>2. Install NTP server</h1>
<p>Now it is necessary to install the NTP package. It is simple as it is available in the official repositories.</p>
<pre class="">:~# yum install ntp</pre>
<p><figure id="attachment_8399" aria-describedby="caption-attachment-8399" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8399" src="https://www.osradar.com/wp-content/uploads/2018/12/2-9.png" alt="2.- Install NTP" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2018/12/2-9.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/2-9-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/2-9-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/2-9-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/2-9-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/2-9-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-8399" class="wp-caption-text">2.- Install NTP</figcaption></figure></p>
<p>Once the installation process is completed, it is necessary to edit the<code> /etc/ntp.con</code>f file, which is where the NTP server configuration is hosted.</p>
<p>First, go to the page where the official NTP servers are hosted. Here you locate the server closest to where the server is physically located.</p>
<p><figure id="attachment_8400" aria-describedby="caption-attachment-8400" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8400" src="https://www.osradar.com/wp-content/uploads/2018/12/3-9.png" alt="3.- Finding the best NTP pool for the server" width="1366" height="671" srcset="https://www.osradar.com/wp-content/uploads/2018/12/3-9.png 1366w, https://www.osradar.com/wp-content/uploads/2018/12/3-9-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/3-9-768x377.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/3-9-1024x503.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/3-9-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2018/12/3-9-1068x525.png 1068w, https://www.osradar.com/wp-content/uploads/2018/12/3-9-855x420.png 855w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-8400" class="wp-caption-text">3.- Finding the best NTP pool for the server</figcaption></figure></p>
<p>Find a server in the same country and add those lines to the configuration file. As I show you in the image.</p>
<pre class="">:~# nano /etc/ntp.conf</pre>
<p><figure id="attachment_8401" aria-describedby="caption-attachment-8401" style="width: 665px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8401" src="https://www.osradar.com/wp-content/uploads/2018/12/4-9.png" alt="4.- Adding the NTP servers to config file" width="665" height="221" srcset="https://www.osradar.com/wp-content/uploads/2018/12/4-9.png 665w, https://www.osradar.com/wp-content/uploads/2018/12/4-9-300x100.png 300w" sizes="(max-width: 665px) 100vw, 665px" /><figcaption id="caption-attachment-8401" class="wp-caption-text">4.- Adding the NTP servers to the config file</figcaption></figure></p>
<p>Of course, now we have to allow network members to synchronize with the server we are configuring. In addition, it is advisable to restrict clients who cannot modify NTP server settings.</p>
<p><figure id="attachment_8402" aria-describedby="caption-attachment-8402" style="width: 673px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8402" src="https://www.osradar.com/wp-content/uploads/2018/12/5-9.png" alt="5.- Allow synchronization with the server" width="673" height="159" srcset="https://www.osradar.com/wp-content/uploads/2018/12/5-9.png 673w, https://www.osradar.com/wp-content/uploads/2018/12/5-9-300x71.png 300w" sizes="(max-width: 673px) 100vw, 673px" /><figcaption id="caption-attachment-8402" class="wp-caption-text">5.- Allow synchronization with the server</figcaption></figure></p>
<p>Finally, you can include a log file to find out what&#8217;s going on with the NTP server. So, it is advisable to do this because if there is a problem viewing that file you can fix it.</p>
<p><figure id="attachment_8403" aria-describedby="caption-attachment-8403" style="width: 731px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8403" src="https://www.osradar.com/wp-content/uploads/2018/12/6-9.png" alt="6.- Adding a log file for NTP" width="731" height="151" srcset="https://www.osradar.com/wp-content/uploads/2018/12/6-9.png 731w, https://www.osradar.com/wp-content/uploads/2018/12/6-9-300x62.png 300w" sizes="(max-width: 731px) 100vw, 731px" /><figcaption id="caption-attachment-8403" class="wp-caption-text">6.- Adding a log file for NTP</figcaption></figure></p>
<h1>3. Set the Firewall rule and start the service</h1>
<p>For the NTP server to work, it is necessary to set the standard in the Firewall so that it can have access.</p>
<pre class="">:~# firewall-cmd --add-service=ntp --permanent
:~# firewall-cmd --reload</pre>
<p><figure id="attachment_8404" aria-describedby="caption-attachment-8404" style="width: 843px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8404" src="https://www.osradar.com/wp-content/uploads/2018/12/7-9.png" alt="7.- Setting the Firewall rule" width="843" height="190" srcset="https://www.osradar.com/wp-content/uploads/2018/12/7-9.png 843w, https://www.osradar.com/wp-content/uploads/2018/12/7-9-300x68.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/7-9-768x173.png 768w" sizes="(max-width: 843px) 100vw, 843px" /><figcaption id="caption-attachment-8404" class="wp-caption-text">7.- Setting the Firewall rule</figcaption></figure></p>
<p>Next, enable and start the service.</p>
<pre class="">:~# systemctl enable ntpd
:~# systemctl start ntpd</pre>
<p><figure id="attachment_8405" aria-describedby="caption-attachment-8405" style="width: 1077px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8405" src="https://www.osradar.com/wp-content/uploads/2018/12/8-9.png" alt="8.- Staring the service" width="1077" height="192" srcset="https://www.osradar.com/wp-content/uploads/2018/12/8-9.png 1077w, https://www.osradar.com/wp-content/uploads/2018/12/8-9-300x53.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/8-9-768x137.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/8-9-1024x183.png 1024w, https://www.osradar.com/wp-content/uploads/2018/12/8-9-1068x190.png 1068w" sizes="(max-width: 1077px) 100vw, 1077px" /><figcaption id="caption-attachment-8405" class="wp-caption-text">8.- Staring the service</figcaption></figure></p>
<p>Now, let&#8217;s verify the NTP server.</p>
<h1>4. Check the NTP server</h1>
<p>It is now necessary to verify that everything has gone well. run this commands to check.</p>
<pre class="">:~# ntpq -p
:~# date -R</pre>
<p><figure id="attachment_8406" aria-describedby="caption-attachment-8406" style="width: 777px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8406" src="https://www.osradar.com/wp-content/uploads/2018/12/9-8.png" alt="9.- Checking the server status" width="777" height="279" srcset="https://www.osradar.com/wp-content/uploads/2018/12/9-8.png 777w, https://www.osradar.com/wp-content/uploads/2018/12/9-8-300x108.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/9-8-768x276.png 768w" sizes="(max-width: 777px) 100vw, 777px" /><figcaption id="caption-attachment-8406" class="wp-caption-text">9.- Checking the server status</figcaption></figure></p>
<p>In case you want to synchronize with a specific server, you can do it with the following command.</p>
<pre class="">:~# ntpdate -q  0.us.pool.ntp.org</pre>
<p><figure id="attachment_8407" aria-describedby="caption-attachment-8407" style="width: 840px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-8407" src="https://www.osradar.com/wp-content/uploads/2018/12/10-8.png" alt="10.- Using ntpd" width="840" height="219" srcset="https://www.osradar.com/wp-content/uploads/2018/12/10-8.png 840w, https://www.osradar.com/wp-content/uploads/2018/12/10-8-300x78.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/10-8-768x200.png 768w" sizes="(max-width: 840px) 100vw, 840px" /><figcaption id="caption-attachment-8407" class="wp-caption-text">10.- Using ntpd</figcaption></figure></p>
<p>And that&#8217;s it.</p>
<h1>Conclusion</h1>
<p>As you can see, setting up an NTP server is not a complicated thing. However, doing so guarantees that our computer equipment has a synchronization in time and date necessary for all processes can be performed properly.</p>
<p>Please share this article with your friends.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-set-up-a-ntp-server-centos-7/">How to set up a NTP server on CentOS 7?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-set-up-a-ntp-server-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install NTP in Ubuntu server 18.04?</title>
		<link>https://www.osradar.com/how-to-install-ntp-in-ubuntu-server-18-04/</link>
					<comments>https://www.osradar.com/how-to-install-ntp-in-ubuntu-server-18-04/#comments</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Thu, 21 Jun 2018 12:29:20 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=4290</guid>

					<description><![CDATA[<p>Network Time Protocol (NTP) is an Internet protocol for synchronizing computer system clocks through packet routing in networks with variable latency. NTP uses UDP as its transport layer, using port 123. This server can be a single machine, several machines or a pool of NTP servers. An NTP server, in turn, can synchronize its time [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-ntp-in-ubuntu-server-18-04/">How to install NTP in Ubuntu server 18.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Network Time Protocol (NTP) is an Internet protocol for synchronizing computer system clocks through packet routing in networks with variable latency. <strong>NTP</strong> uses UDP as its transport layer,<strong> using port 123.</strong></p>
<p>This server can be a single machine, several machines or a pool of NTP servers. An NTP server, in turn, can synchronize its time with another NTP server by creating a cascading system between NTP servers. The NTP protocol is able to synchronize the time of the equipment with an accuracy of <strong>milliseconds</strong>.</p>
<p>NTP is one of the oldest internet protocols still in use, developed in 1981 and first described in RFC 778. NTP was originally designed by David L. Mills of the University of Delaware1, who continues to maintain it, along with a team of volunteers.</p>
<h2>Get to work!!</h2>
<p>In Ubuntu server the root account is usually disabled. We don&#8217;t really need to enable it, but we do need to log in as root. To do this, write:</p>
<p><strong>              sudo -i</strong></p>
<p>By entering the user&#8217;s password, we will already be root users.</p>
<p><figure id="attachment_4291" aria-describedby="caption-attachment-4291" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4291" src="https://www.osradar.com/wp-content/uploads/2018/06/1-16.png" alt="1.- Upgrading the System" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/1-16.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/1-16-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/1-16-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/1-16-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/1-16-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/1-16-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/1-16-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4291" class="wp-caption-text">1.- Root User</figcaption></figure></p>
<p>Once logged in as root user, we must update the system. To this end, we write:</p>
<p><strong>               apt update &amp;&amp;  apt -y upgrade</strong></p>
<p><figure id="attachment_4292" aria-describedby="caption-attachment-4292" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4292" src="https://www.osradar.com/wp-content/uploads/2018/06/2-17.png" alt="2.- Upgrading Ubuntu" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/2-17.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/2-17-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/2-17-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/2-17-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/2-17-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/2-17-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/2-17-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4292" class="wp-caption-text">2.- Upgrading Ubuntu</figcaption></figure></p>
<p>This will provide the latest security patches and critical updates.</p>
<p>Next we must install the necessary packages to have an NTP server:</p>
<p><strong>                 apt install ntp ntpdate</strong></p>
<p><figure id="attachment_4293" aria-describedby="caption-attachment-4293" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4293" src="https://www.osradar.com/wp-content/uploads/2018/06/3-17.png" alt="3.- Installing ntp" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/3-17.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/3-17-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/3-17-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/3-17-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/3-17-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/3-17-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/3-17-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4293" class="wp-caption-text">3.- Installing ntp</figcaption></figure></p>
<p>With these packages installed, we must now make sure that the Timezone of our equipment is according to its physical location, with the timedatectl command we will get the current one:</p>
<p><strong>                timedatectl</strong></p>
<p><figure id="attachment_4294" aria-describedby="caption-attachment-4294" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4294" src="https://www.osradar.com/wp-content/uploads/2018/06/4-15.png" alt="timezonectl" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/4-15.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/4-15-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/4-15-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/4-15-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/4-15-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/4-15-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/4-15-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4294" class="wp-caption-text">4.- timedatectl</figcaption></figure></p>
<p>If you do not have the Timezone correctly defined, then we proceed to change it. In this case I&#8217;ll use America/Caracas.</p>
<p><strong>              timedatectl list-timezones | grep -i Caracas</strong></p>
<p>List-timezones is the options that allows to list all the available timezones, combining it with grep we can filter it to quickly locate the right timezone.</p>
<p>&nbsp;</p>
<p><figure id="attachment_4295" aria-describedby="caption-attachment-4295" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4295" src="https://www.osradar.com/wp-content/uploads/2018/06/5-16.png" alt="5.- Finding right timezone" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/5-16.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/5-16-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/5-16-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/5-16-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/5-16-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/5-16-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/5-16-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4295" class="wp-caption-text">5.- Finding right timezone</figcaption></figure></p>
<p>And we proceed to change the timezone:</p>
<p><strong>timedatectl set-timezone America/Caracas</strong></p>
<p>After that, we run the timedatectl command again:</p>
<p><figure id="attachment_4296" aria-describedby="caption-attachment-4296" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4296" src="https://www.osradar.com/wp-content/uploads/2018/06/6-16.png" alt="6.- Timedatectl" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/6-16.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/6-16-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/6-16-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/6-16-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/6-16-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/6-16-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/6-16-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4296" class="wp-caption-text">6.- Timedatectl</figcaption></figure></p>
<h2>Basic configuration of NTP</h2>
<p>Next, we must edit the file /etc/ntp.conf indicating the official NTP servers so that our server can synchronize. The active servers can be viewed on the Official NTP website <a href="http://www.pool.ntp.org/es/">http://www.pool.ntp.org/es/  </a>Normally we must choose one located on our own continent.</p>
<p>In my case I must put in my configuration file, the following servers:</p>
<p><strong>A)</strong>  server 0.south-america.pool.ntp.org<br />
<strong>  B) </strong>server 1.south-america.pool.ntp.org<br />
<strong>    C) </strong>server 2.south-america.pool.ntp.org<br />
<strong> D)</strong> server 3.south-america.pool.ntp.org</p>
<p><strong>               nano /etc/ntp.conf</strong></p>
<p><figure id="attachment_4297" aria-describedby="caption-attachment-4297" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4297" src="https://www.osradar.com/wp-content/uploads/2018/06/7-15.png" alt="7.- Editing file ntp.conf" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/7-15.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/7-15-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/7-15-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/7-15-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/7-15-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/7-15-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/7-15-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4297" class="wp-caption-text">7.- Editing file ntp.conf</figcaption></figure></p>
<p>If you find Ubuntu&#8217;s default NTP servers, you can comment on them and add the appropriate ones. Also, don&#8217;t forget that they take the word &#8220;pool&#8221; to the beginning.</p>
<p>We leave the editor and proceed to restart the service for the changes to take effect.</p>
<p><strong>              systemctl restart ntp</strong></p>
<p><figure id="attachment_4298" aria-describedby="caption-attachment-4298" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4298" src="https://www.osradar.com/wp-content/uploads/2018/06/8-13.png" alt="8.- Restarting ntp" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/8-13.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/8-13-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/8-13-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/8-13-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/8-13-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/8-13-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/8-13-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4298" class="wp-caption-text">8.- Restarting ntp</figcaption></figure></p>
<p>The next step will be to verify if our server is synchronizing with the NTP servers that we place in our configuration file. We write:</p>
<p><strong>              ntpq -p</strong></p>
<p><figure id="attachment_4299" aria-describedby="caption-attachment-4299" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4299" src="https://www.osradar.com/wp-content/uploads/2018/06/9-11.png" alt="9.- NTP server running" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/9-11.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/9-11-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/9-11-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/9-11-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/9-11-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/9-11-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/9-11-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4299" class="wp-caption-text">9.- NTP server running</figcaption></figure></p>
<p>In the previous image we see how the server is running and synchronizing with the servers placed in the file. Remember that ubuntu also defaults to a backup server.</p>
<p>Of the data shown, the most relevant are Remote, which is the name of the server; refid, which says the ip address of the server; Delay, which gives us the time in milliseconds of the delay between our server and the NTP server.</p>
<h2>Configuring the clients</h2>
<p>Now we&#8217;re going to set up an NTP client that uses the previous server as the primary one. I will use a computer with Debian 9 installed.</p>
<p>Just like on the server, we must install ntp:</p>
<p><strong>apt install ntp</strong></p>
<p><figure id="attachment_4300" aria-describedby="caption-attachment-4300" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4300" src="https://www.osradar.com/wp-content/uploads/2018/06/10-10.png" alt="10.- Installing ntp in a client" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/10-10.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/10-10-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/10-10-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/10-10-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/10-10-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/10-10-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/10-10-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4300" class="wp-caption-text">10.- Installing ntp in a client</figcaption></figure></p>
<p>Next we must edit the file /etc/ntp.conf and add the ip address of our NTP server.</p>
<p>We can force synchronization with the following command:</p>
<p><strong>               ntpdate ip_ntp_server</strong></p>
<p>but to do the above procedure, we must stop the ntp service:</p>
<p><strong>               sytemctl stop ntp</strong></p>
<p>And:</p>
<p><strong>ntpd ip_ntp_server</strong></p>
<p>Finally:</p>
<p><strong>               sytemctl start ntp</strong></p>
<p><figure id="attachment_4301" aria-describedby="caption-attachment-4301" style="width: 1368px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-4301" src="https://www.osradar.com/wp-content/uploads/2018/06/11-11.png" alt="11.- Forcing Synchronization" width="1368" height="738" srcset="https://www.osradar.com/wp-content/uploads/2018/06/11-11.png 1368w, https://www.osradar.com/wp-content/uploads/2018/06/11-11-300x162.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/11-11-768x414.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/11-11-1024x552.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/11-11-696x375.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/11-11-1068x576.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/11-11-779x420.png 779w" sizes="(max-width: 1368px) 100vw, 1368px" /><figcaption id="caption-attachment-4301" class="wp-caption-text">11.- Forcing Synchronization</figcaption></figure></p>
<p>With this we already have NTP correctly configured. Remember that NTP works in a hierarchical fashion so that one server can actually target many. The important thing is that our teams are synchronized with each other, making them all have the same time and date, which is vital to maintaining order and data integrity in computer systems.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-ntp-in-ubuntu-server-18-04/">How to install NTP in Ubuntu server 18.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-ntp-in-ubuntu-server-18-04/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to Sync Your Linux with NTP</title>
		<link>https://www.osradar.com/how-to-sync-your-linux-with-ntp/</link>
					<comments>https://www.osradar.com/how-to-sync-your-linux-with-ntp/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Sat, 05 May 2018 14:05:18 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[configure ntp]]></category>
		<category><![CDATA[configure ntp linux]]></category>
		<category><![CDATA[enable ntp]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[time server]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=2916</guid>

					<description><![CDATA[<p>Time is the most important value in our life, philosophically speaking. Since the starting of our life, we’ve been taught that time is money. That’s why it’s really important to maintain the time in our life. That’s even a burning truth to the systems where even the slightest bit of delay in the system can [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-sync-your-linux-with-ntp/">How to Sync Your Linux with NTP</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Time is the most important value in our life, philosophically speaking. Since the starting of our life, we’ve been taught that time is money. That’s why it’s really important to maintain the time in our life. That’s even a burning truth to the systems where even the slightest bit of delay in the system can cause serious and troublesome issues in lots of places. The best solution for this problem is NTP.</p>
<p>That’s what I faced several days ago when the computer time went haywire. Almost all the major sites were blocked in my device, thinking that I may be a hacker or some intruder. Thankfully, I synced with the NTP and fixed the issue. It’s always a good idea to sync your system with any NTP for keeping your PC’s time always up-to-date.</p>
<h3>What is NTP?</h3>
<p>NTP stands for Network Time Protocol. It’s a networking protocol that’s being used widely for syncing clocks between computer systems where system latency is a big factor. It’s also quite useful for keeping your system’s time up-to-date. In fact, it’s one of the oldest network protocols still in use.</p>
<h3>Syncing your Linux with NTP</h3>
<p>In most of the Linux systems, it’s done automatically. However, your system is prone to go haywire time to time. Let’s fix the system once and for all.</p>
<h3>Installing NTPd</h3>
<p>It comes pre-installed in lots of Linux distros, but just to make sure that it’s present in your system.</p>
<ul>
<li>Ubuntu</li>
</ul>
<pre>sudo apt install ntp</pre>
<p><img loading="lazy" class="size-full wp-image-2917 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/install-ntp-ubuntu.png" alt="" width="1186" height="485" srcset="https://www.osradar.com/wp-content/uploads/2018/05/install-ntp-ubuntu.png 1186w, https://www.osradar.com/wp-content/uploads/2018/05/install-ntp-ubuntu-300x123.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/install-ntp-ubuntu-768x314.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/install-ntp-ubuntu-1024x419.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/install-ntp-ubuntu-696x285.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/install-ntp-ubuntu-1068x437.png 1068w, https://www.osradar.com/wp-content/uploads/2018/05/install-ntp-ubuntu-1027x420.png 1027w" sizes="(max-width: 1186px) 100vw, 1186px" /></p>
<ul>
<li>Debian</li>
</ul>
<pre>sudo apt-get install ntp</pre>
<ul>
<li>Fedora</li>
</ul>
<pre>sudo dnf install ntp</pre>
<ul>
<li>OpenSUSE</li>
</ul>
<pre>sudo zypper install ntp</pre>
<ul>
<li>Arch Linux</li>
</ul>
<pre>sudo pacman -S ntp</pre>
<h3>Configuring the NTP server</h3>
<p>The NTPd program comes up with preset NTP servers in the configuration file. Those are enough for average users, but I recommend to switch to better servers like Google NTP.</p>
<p>For adding the Google NTP server in the system, run this command:</p>
<pre>sudo nano /etc/ntp.conf</pre>
<p>Now, add these lines in the file:</p>
<pre>server time.google.com iburst

server time2.google.com iburst

server time3.google.com iburst</pre>
<h3><img loading="lazy" class="size-full wp-image-2918 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/add-google-ntp-ntp-configuration.png" alt="" width="1183" height="487" srcset="https://www.osradar.com/wp-content/uploads/2018/05/add-google-ntp-ntp-configuration.png 1183w, https://www.osradar.com/wp-content/uploads/2018/05/add-google-ntp-ntp-configuration-300x123.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/add-google-ntp-ntp-configuration-768x316.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/add-google-ntp-ntp-configuration-1024x422.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/add-google-ntp-ntp-configuration-696x287.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/add-google-ntp-ntp-configuration-1068x440.png 1068w, https://www.osradar.com/wp-content/uploads/2018/05/add-google-ntp-ntp-configuration-1020x420.png 1020w" sizes="(max-width: 1183px) 100vw, 1183px" /></h3>
<h3>Setting time zone</h3>
<p>Before NTPd starts syncing with the time server, it needs to know your time zone. For setting that up, start a terminal and run this command:</p>
<pre>tzselect</pre>
<p>The wizard will walk you through setting up your time zone.</p>
<p><img loading="lazy" class="size-full wp-image-2919 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/configure-time-zone-for-ntp.png" alt="" width="1182" height="350" srcset="https://www.osradar.com/wp-content/uploads/2018/05/configure-time-zone-for-ntp.png 1182w, https://www.osradar.com/wp-content/uploads/2018/05/configure-time-zone-for-ntp-300x89.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/configure-time-zone-for-ntp-768x227.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/configure-time-zone-for-ntp-1024x303.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/configure-time-zone-for-ntp-696x206.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/configure-time-zone-for-ntp-1068x316.png 1068w" sizes="(max-width: 1182px) 100vw, 1182px" /></p>
<h3>Starting NTPd</h3>
<p>Open a terminal and run the following commands:</p>
<pre>sudo systemctl start ntp.service

sudo systemctl enable ntp.service</pre>
<p><img loading="lazy" class="size-full wp-image-2920 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/05/enable-ntp-service.png" alt="" width="1184" height="269" srcset="https://www.osradar.com/wp-content/uploads/2018/05/enable-ntp-service.png 1184w, https://www.osradar.com/wp-content/uploads/2018/05/enable-ntp-service-300x68.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/enable-ntp-service-768x174.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/enable-ntp-service-1024x233.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/enable-ntp-service-696x158.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/enable-ntp-service-1068x243.png 1068w" sizes="(max-width: 1184px) 100vw, 1184px" /></p>
<p>Enjoy the super accurate timing of your PC!</p>
<p>Love Linux? Then <a href="https://www.osradar.com/ubuntu-18-04-lts-better-than-ever/">try out the latest features of Ubuntu 18.04 LTS</a>!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-sync-your-linux-with-ntp/">How to Sync Your Linux with NTP</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-sync-your-linux-with-ntp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
