Process to configure an NTP server and client on Ubuntu 20.04 LTS ?

This article will guide you on how to configure the NTP server on the #Ubuntu machine and then sync a clock of NTP client machine. Now you can easily set up NTP server and connect multiple client machines with it for time synchronization.

The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks.

NTP is intended to synchronize all participating computers to within a few milliseconds of Coordinated Universal Time (UTC).

How do I start #NTP on Linux?

In order to add command line options to the ntpd service (/etc/init. d/ntpd), one has to edit /etc/sysconfig/ntpd file and add the desired option to the OPTIONS variable, and restart the service via 'service ntpd restart'.

What port does NTP use?

NTP time servers work within the TCP/IP suite and rely on User Datagram Protocol (UDP) port 123. NTP servers are normally dedicated NTP devices that use a single time reference to which they can synchronize a network. 

This time reference is most often a Coordinated Universal Time (UTC) source.

To Sync NTP client with server via command line:

1. Edit the /etc/ntp.

2. Search for the lines beginning server .

3. Replace the server entries with the IP address or hostname of the NTP server or servers with which you want to synchronize.

4. Save the file.

5. Configure the NTP client service to start at run level 3 when the appliance boots.