Install NTP Ubuntu ...
 
Share:
Notifications
Clear all

Install NTP Ubuntu 20.04 22.04 and 24.04 Server


Brandon Lee
Posts: 513
Admin
Topic starter
(@brandon-lee)
Member
Joined: 15 years ago

Installing NTP in your Ubuntu Server or workstation helps to make sure everything works smoothly especially with systems that depend on time sychronization. One of these is Ceph or Microceph. Let's look at the quick steps to get NTP installed and configured in Ubuntu.

To install the NTP package, run the following command:

sudo apt install ntp -y
 
Add the NTP Server Pool that you want to use. To do that, we edit the file /etc/ntp.conf. In that file, place the following as an example if you are in the US:
 
sudo nano /etc/ntp.conf
 
Add the following in that file:
 
# Use US-based NTP servers from the NTP Pool Project
server 0.us.pool.ntp.org iburst
server 1.us.pool.ntp.org iburst
server 2.us.pool.ntp.org iburst
server 3.us.pool.ntp.org iburst
 
Restart NTP service
 
sudo systemctl restart ntp
 
View the configuration:
 
ntpq -p
 
Hopefully, this will help anyone looking to install and configure NTP in Ubuntu.