ntp date not showing the correct time

6,780

The following command update your date and time :)

ntpdate ntp.ubuntu.com
Share:
6,780

Related videos on Youtube

chadwicke619
Author by

chadwicke619

Updated on September 18, 2022

Comments

  • chadwicke619
    chadwicke619 over 1 year

    I was having an issue in which the time my ubuntu machine was showing is 5 hours ahead of my standard time. So I installed ntpd for that using

    apt-get install ntp
    

    after that I restarted ntp but still my time is 5 hours ahead of my standard time in India. Please Help.

    • gertvdijk
      gertvdijk almost 11 years
      What does the mtop has to do with ntp? Is this a result of an earlier attempt to install mtop? I don't see anything about that in your question.
    • chadwicke619
      chadwicke619 almost 11 years
      I know mtop does't has to do anything with ntp. I was trying to install ntp not mtop.
    • gertvdijk
      gertvdijk almost 11 years
      Okay, then I think it is a duplicate of Unable to synchronize time using NTP
    • chadwicke619
      chadwicke619 almost 11 years
      No I tried that approach gives the error #service ntp stop then, #ntpdate ntp.ubuntu.com 22 Jul 19:30:31 ntpdate[29701]: no server suitable for synchronization found
    • gertvdijk
      gertvdijk almost 11 years
      Well, have you tried another server besides ntp.ubuntu.com? It may be down for you or too far geographically so it disregards that as suitable. Try pool.ntp.org or <country-tld>.pool.ntp.org (e.g. nl.pool.ntp.org). And do you have a working internet connection accepting outbound NTP traffic?
  • chadwicke619
    chadwicke619 almost 11 years
    ntpdate ntp.ubuntu.com 22 Jul 19:11:53 ntpdate[29585]: the NTP socket is in use, exiting
  • Mitesh Shah
    Mitesh Shah almost 11 years
    service ntpd stop; ntpdate ntp.ubuntu.com
  • chadwicke619
    chadwicke619 almost 11 years
    service ntpd stop ntpd: unrecognized service
  • chadwicke619
    chadwicke619 almost 11 years
    I tried it #service ntp stop then, #ntpdate ntp.ubuntu.com 22 Jul 19:30:31 ntpdate[29701]: no server suitable for synchronization found
  • chadwicke619
    chadwicke619 over 10 years
    I found the solution to my problem the port number 123 which is used by ntp was not open. Now everything is smooth.
  • Steve Kroon
    Steve Kroon almost 8 years
    @Tarun: How do you check if the port is open/closed?