How-To Geek
Sync Your System Clock with Internet Time Servers in Ubuntu
Ubuntu has an easy way to keep your system synchronized with the internet time servers. This is especially useful on older computers that may have problems with the system clock losing time.
Note: This article is out of date. Please read our updated article, Sync the Clock with Internet Time Servers in Ubuntu 10.04
To enable this feature, first we’ll right click the clock and choose Adjust Date & Time:

You should see this screen, where you can select the checkbox to synchronize the time:


Most likely, NTP support has not been installed on your computer, unless you had installed it before. Click the Install NTP support button to install it.

Your system should now start synchronizing the time with the time servers. If you want to manually sync the time, you have to first uncheck the “keep clock synchronized” checkbox, and then you can check the “Synchronize Now” button:

Pretty cool.
Got Feedback? Join the discussion at discuss.howtogeek.com
Comments (14)
Programmer by day, geek by night, The Geek, also known as Lowell Heddings, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on Google+ if you'd like.
- Published 12/5/06




Is NTP resource intensive? Im hesitating installing it bc i worry it kills sys resources…
I decided not to use another deamon but to add a simple command in my startup script:
sudo ntpdate pool.ntp.org
It keeps my time uptodate via timeserver pool.ntp.org, maybe you should use a server from a location near you.
The command takes just 2 seconds to complete at startup, and it doesn’t kill your resources.
You can create a cron job too if you like!
Thanks, this was just what I was looking for, your presentation was very clear. Nice work.
Ah,.. this is what I like to see,.. geek-speak for utter numpties! (like me!) Cheers mate, works a treat and no it doesn’t eat the system!
Rob, unfortunately, that’s not the preferred solution. The ntp daemon uses almost no resources. On my system right now, there is approximately 300K of RAM used by it, and no processor usage. Do a quick search for ntpd vs. ntpdate, and you’ll find ‘everyone’ recommends ntpd. It keeps track of your synchronizations, and accounts for some other variables to keep your clock even more accurate than just running ntpdate at startup. Of course, if you really don’t care about having an accurate clock all the time, by all means setup a cronjob or startup script with ntpdate, but that’s my 2 cents.
Very easy to understand. Well done
This information is out of date for Ubuntu Intrepid (8.10). In a vanilla installation, there are no options for NTP in the Date & Time settings, nor are there any prompts to install NTP support. It looks as if this feature has been discontinued unless you have the knowledge to set it up manually at the command line (fortunately, I do).
I imagine, this is to prevent all new Ubuntu users from synchonrising to the same default time server and never changing it to sync to one that is nearer to home. This is one of those areas where ‘paid for’ operating systems win out in my opinion. Microsoft and Apple can afford to set up and maintain a bunch of their own time servers (time.windows.com, time.euro.apple.com, etc.) for their users.
Would have been great if HappySpaceInvader had actually posted how to set it from the terminal. My laptop’s onboard battery is dead so each time I start up I have to manually set the time.
II installed VMware Kubuntu on Windows Vista. Under system settings > Internet & Networks > Connections > Proxy > Use the following login information section is disabled. Whenever I use a browser it prompts me for a user name and password. But when synching the system clock with a time server it gives an error saying unable to connect to time server.
Is there a way around this to manually set the username and password somewhere?
Thank You
@ Jason (and anyone else who would like to know)
How to set NTP time sync from terminal:
sudo aptitude install ntp ntpdate
Be sure to access the application from System / Administration / Time and Date
and select a server closest to your location.
What would it cost them to use NIST’s time server (for more free ones checkout the drop-down list at synchronize time pane of recent Windows). Could even talk to Microsoft’s time server, it’s a standard protocol isn’t it after all?
Also user may want to manually sync once (at this PC I’m writing now the RTC battery is dead, have no spare one at hand and it starts up with wrong time), but they aren’t shown that option anymore by default and can’t spot it at Add/Remove apps by searching say for Time. Searching for NTP give results for NNTP (newsgroups) apps. Wonder why there’s no small app/applet to sync the time once (instead of calling a payphone to get the latest time or searching the net to find some webpage with current time for your zone)
Another strange thing is that at System / Administration / Time and Date, it has an Unlock button which is strange compared to rest of GNOME GUI and also it allows one to select multiple servers, but has no way to define the order they’ll be queried (I assume it doesn’t talk to all selected, just tries one and if it doesn’t respond [is there a timeout setting?] it tries another etc.)
Btw, it seems to default to ntp.ubuntu.com now. I wonder if pool.ntp.org mentioned at the article is active. If so I’d prefer that one (the dialog allows you to add more time servers – adds them to the bottom of the list and selects them, but you can then deselect them if you just want to enrich that list for future use). I suppose pool.ntp.org is a broker server, not the real time server itself, it just picks another time server and sends you there.
Where can I get the source code for synchronizing with an internet time server? I need it for my project. Please help me.
:)