Categories: TutorialsUbuntu

Synchronize the time on Ubuntu from a NTP Server

To synchronize the time on a Ubuntu computer, with the time from a NTP server, you can simply run the following command:

sudo ntpdate 0.pool.ntp.org

Replace “0.pool.ntp.org” with your NTP time server of choice.
Example output:

$ sudo ntpdate 0.pool.ntp.org
 1 Jul 00:50:12 ntpdate[31843]: adjust time server 12.34.56.78 offset -0.001309 sec
$

Your time will now be synchronized to the time from the NTP server.
You can put this in a cron job to periodically update the time, to ensure its always up to date. This can be important when looking over logs. The right time makes things a lot easier.
If you need to change your timezone, please check out:

Sponsored
Change the Timezone in Ubuntu
Sponsored

The post Synchronize the time on Ubuntu from a NTP Server appeared first on Networking HowTos.

Ubuntu Server Admin

Recent Posts

How to Fix VMware’s “Could not open /dev/vmmon” Error on Ubuntu

You’ve recently installed VMware Workstation on your Ubuntu system and encountered the frustrating “Could not…

5 hours ago

How to Fix Ubuntu 404 Errors While Fetching Dependencies

Have you ever found yourself staring at a terminal full of 404 errors while trying…

5 hours ago

How to Fix ‘Please Install All Available Updates’ Error When Upgrading Ubuntu 18.04 to 20.04 LTS

One particularly frustrating error that many users face when trying to upgrade from Ubuntu 18.04 …

5 hours ago

How to fix “Release is not valid yet” Error in Docker Containers

In the world of containerization, time synchronization issues can create unexpected roadblocks when working with…

5 hours ago

How to fix “Externally Managed Environment” Pip Errors on Ubuntu

If you’ve recently upgraded to Ubuntu 23.04 or newer, you might have encountered a frustrating…

5 hours ago

Ubuntu now officially supports NVIDIA Jetson: powering the future of AI at the edge

Canonical announces the General Availability of Ubuntu for the NVIDIA® Jetson Orin™ for edge AI…

12 hours ago