Linux - Network time protocol (NTP)

Table of Contents

Network time protocol (NTP) is a very convenient service which can provide network time synchronized automatically and periodically. This post briefly describes the installation and configuration of NTP on Linux OS.

Installation

Without loss of generality, we take Arch Linux for instance here.

pacman -S ntp

Configuration

Prepend following line(s) to /etc/ntp.conf.

  • As server
server 127.127.1.1
fudge 127.127.1.1 stratum 12
  • As client
server IP_ADDRESS

Start and enable the service

systemctl enable ntpd.service
systemctl start ntpd.service