Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home Tutorials Setting time using NTP

Setting time using NTP

— filed under: ,

Linux: Quick one-shot time synchronization

If you need to quickly synchronize your computer's clock, you can use ntpdate command. It is normally installed as part of ntpdate package. Under Debian / Ubuntu or similar derivatives distribution, this package can be installed with this command:

sudo apt-get install ntpdate

To synchronize, the command is:

sudo ntpdate -b pool.ntp.org

You should see output something similar to this:

x:~$ sudo ntpdate -b pool.ntp.org
11 Dec 10:04:05 ntpdate[32158]: step time server 64.202.112.75 offset 20.564982 sec

This is indicates a successful synchronization. If you instead got the error "the NTP socket is in use, exiting", then NTP server is already running in your system, and the system is already set-up to periodically synchronize your computer's clock.

Please Donate

If you find contents of this website is useful to you, please consider to donate. Proceeds will go towards the site maintenance.

 
Creative Commons Plone Zope Python
web page monitoring website performance SiteUptime Web Site Monitoring Service Clicky Web Analytics