Ujang Mumu
My Notes

Follow

My Notes

Follow
How to Set Up NTP on Ubuntu in AWS

Photo by Aron Visuals on Unsplash

How to Set Up NTP on Ubuntu in AWS

Ujang Mumu's photo
Ujang Mumu
·Feb 20, 2023·

1 min read

Table of contents

  • Configure NTP in timesyncd.conf
  1. Configure NTP in timesyncd.conf

echo "NTP=169.254.169.123" | sudo tee -a /etc/systemd/timesyncd.conf
cat /etc/systemd/timesyncd.conf
  1. Enable the timesyncd.service
sudo systemctl unmask systemd-timesyncd.service
sudo apt install systemd-timesyncd -y
  1. Enable the timesyncd.service at boot & Restart
sudo systemctl enable systemd-timesyncd.service
sudo  systemctl restart systemd-timesyncd
  1. Set the system time to be synchronized with NTP
sudo  timedatectl set-ntp true
 
Share this