• ARTICLES
SEARCH

How-To Geek

Sync the Clock with Internet Time Servers in Ubuntu 10.04

Ubuntu has an easy way to keep your system clock synchronized with the internet time servers, but sadly it’s not enabled by default. Here’s the quick steps required to enable it for your system.

Note: We’ve previously written about how to do this in an older version of Ubuntu, but that method doesn’t work anymore.

Sync the Clock with Internet Time Servers

You’ll need to start off with Administration –> Time and Date.

image

Then use the Click to make changes button to enable the window.image

Then change Configuration from Manual to Keep synchronized with Internet servers.

image

At this point you’ll probably be prompted to install NTP support, and asked for your password again, which is annoying.

image

At this point the window will change, and you can select the time servers you want to use—make sure that you set your Time zone properly here.

image

That’s all there is to it! You now have internet time up and running on your Ubuntu box.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 08/27/10

Comments (12)

  1. Robert

    At least in Kubuntu, you will fail with an error message, “Unable to contact ___(whatever server you picked)” if you are running the ntp daemon. Of course, if you are running the ntp daemon, you’re already keeping synchronized anyway.

  2. Mohan

    Yep I do this on my system (windows included). Then I don’t have to worry about the clock falling behind or going ahead.

  3. Spydeyrch

    Nice quick little tut there. Thanks! Something that might be a huge help for a future article, how to keep both windows and ubuntu synced correctly in a dual boot system. For some reason, whenerver I use ubuntu for a period of time (minutes, hours, days, etc), the next time I log into windows, it’s clock is off and I have to go in to manually sync it. Just a thought! :-)

    -Spydey

  4. JVictor

    That was very useful. I have used Ubuntu for years and when I upgraded to 10.04 I just assumed that it would use NTP ‘out of the box’ because I had it doing it before.
    @Spydeyrch : I guess if you set up your WIndows side to do a NTP update automatically ( I saw that the Howto Geek had a companion article on doing that) , then it should set itself up when it boots, wouldn’t it?

  5. bla

    In Linux you can also set the system clock to be local. Have a look in the Gentoo docs.
    That way Linux and Windows won’t conflict with each other.

  6. sasa

    it didn’t work, I test if it will really sync, I advance the clock a few minutes and I click on synchronize now button and nothing happened, my system clock did not adjust to the right time. By the way I’m using Ubuntu 10.10.

  7. mervster

    Yea, I have had the same problem with ubuntu, it only seems to sync to the internet server selected at boot time, if the system is left logged on for a few days it seems to drift out of sync, this tells me that the process which checks this only does it once, !!! what good is that ? !!!.

    Merv

  8. Colin Keenan

    I don’t believe it is really doing the sync because the time doesn’t match a separate windows computer when I tell the windows computer to sync now, and I don’t see a “sync now” button in Ubuntu 10.10. Where did you find it sasa?

  9. Zedi

    Spot on mervster! I’m using Ubuntu 10.10 and if I keep logged on for whole day my clock drifts out more than half an hour. Not good enough for a OS aspiring to be better than Windows!
    Anybody with solution out there?

  10. Derek

    Haven’t tried it yet, but this may help:

    https://help.ubuntu.com/10.04/serverguide/C/NTP.html

  11. Derek

    Yup, that did the trick for me.

    Create /etc/cron.daily/ntpupdate with content:

    ntpdate [ ]*

    sudo chmod 755 /etc/cron.daily/ntpupdate

    Then it will sync your clock every day.

  12. Derek

    Hmm, change the above file content to:

    ntpdate my-time-server

    I had some angle brackets in the message above that got filtered. My bad.

Enter Your Email Here to Get Access for Free:

Go check your email!