Configuring an NTP client on Ubuntu 18.04 LTS
Configuring an NTP client on Ubuntu 18.04 LTS
February 12, 2020
Note
This post may be partially machine- or AI-translated. If there is any discrepancy, the Korean version takes precedence.
Install NTP on Ubuntu 18.04 LTS and synchronize time.
Install NTP
$ sudo apt install ntpConfigure NTP
Choose the servers to use.
I will use NTP servers from pool.ntp.org.
Korea pool: https://www.ntppool.org/zone/kr
1.kr.pool.ntp.org
1.asia.pool.ntp.org
0.asia.pool.ntp.orgChange the NTP configuration.
$ sudo nano /etc/ntp.conf# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
# Use Ubuntu's ntp server as a fallback.
pool ntp.ubuntu.comComment out the preset servers and enter the selected server addresses.
# Specify one or more NTP servers.
server 1.kr.pool.ntp.org
server 1.asia.pool.ntp.org
server 0.asia.pool.ntp.org
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst
# Use Ubuntu's ntp server as a fallback.
#pool ntp.ubuntu.comPress Ctrl + X - Y - Enter to save.
Restart the NTP service.
$ sudo service ntp restartCheck synchronization
$ sudo ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+ec2-13-124-227- 131.130.251.107 2 u 31 64 37 12.167 0.067 3.915
time.cloudflare 10.51.8.5 3 u 297 64 20 34.039 -7.609 0.000
*send.mx.cdnetwo 216.239.35.8 2 u 32 64 37 3.745 3.930 3.948The server with * in the first column is the server currently being synchronized with.
Last updated on