How to update NTP to sync clock on Linux

0 min read 64 words

If you need to sync the clock on Linux using the central NTP clock service, you can do the following:

sudo service ntp stop
sudo ntpd -gq
sudo service ntp start

The -gg flags do the following:

  1. Tell g flag tells the NTP Daemon to correct the time regardless of the offset
  2. The q flag tells it to exit immediately after setting the time
Tags:
Andrew
Andrew

Andrew is a visionary software engineer and DevOps expert with a proven track record of delivering cutting-edge solutions that drive innovation at Ataiva.com. As a leader on numerous high-profile projects, Andrew brings his exceptional technical expertise and collaborative leadership skills to the table, fostering a culture of agility and excellence within the team. With a passion for architecting scalable systems, automating workflows, and empowering teams, Andrew is a sought-after authority in the field of software development and DevOps.

Tags