Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells

Force NTP Time Update on Linux

Submitted by on February 21, 2011 – 8:36 pm 11 Comments

Imagine this: you created the /etc/ntp.conf file, enabled and started the ntpd service, and… the system time is still off. Is there a way to force time sync with the NTP server? It must be your lucky day. All you have to do is to connect to your box as root and run the following command:

sntp -r pool.ntp.org
# or
ntpdate -u pool.ntp.org

The “pool.ntp.org” is a public NTP service. You can replace this with the fully-qualified DNS name or IP address of your own NTP server. Keep in mind that this command will sync date and time immediately – not gradually. So if you have some time-sensitive applications running, maybe you should schedule a brief outage to restart these applications.

Print Friendly, PDF & Email

11 Comments »

  • Robert Wolfe says:

    Or, if under OpenSuSE, you can resync the time by restarting ntpd as follows:

    /etc/init.d/ntp restart

    Again, run this either as root or from within the sudo command:

    sudo /etc/init.d/ntp restart

  • morbiusdog says:

    I’ve tried searching for them, and the only thing I get are ads to buy a time server. Maybe at some point, but not right now, lol

  • slipknot0129 says:

    Hello,

    i need to get the current date from the internet using ntp or something, and that because date in my computer not always correct.

    do u know a component, function or and tool in delphi that helps in retrieving current date from internet?

    thank you

  • Vultre9 says:

    on one of the news blog sites I read, it puts the name of the city you are writing from under your name. Some people on the site clam people can make a change on their computer to make it look like they are typing from a different city. Is this true? and is so How do you do it?

  • airdogspace2 says:

    I have a desktop and a laptop. Both run on the same internet connection and both sync with the same time (NTP) server (time.nist.gov). The laptop always syncs to the correct time (which matches my cell phone, and the time that my router picks up from the same NTP server) but the desktop always syncs NINE minutes ahead.

    When I first noticed the problem a couple of months ago it was only 6 or 7 minutes ahead. I think it’s getting worse. No matter how many times I successfully sync the time it never matches.

    Any ideas??
    Good question about the OS.. they are both running Windows XP but the desktop (the one that has the incorrect clock) is still on service pack 2. The laptop is on service pack 3!!

  • Splash Log Level 2 Again says:

    need some entertainment. Come on people. What you got?(:

  • brincks26 says:

    Hello
    Need command line on how to enable logging on a cisco 2811. Circuit bouncing and can’t see for how long it goes down or the alarms on the ckt.

    Thank you in advance
    IOS

    (C2800NM-IPVOICEK9-M), Version 12.4(20)T1, RE)

  • Alun J says:

    Computer time and date are reset (01/01/2002) at every time of switch on my computer. at the time of switch on it show a message “CMOS is bad”.
    computer battery is replaced,however these problem is existing, what is the reason for this?
    some time this problem is solved automatically,after some days it shown again, how can i solve this?

  • Gabriel Kenney says:

    I need a cheapish NTP client clock (stratum 2) that can sync to a master NTP/GPS clock. Primarily I need an LTC timecode output but would like the clock to be able to act as an NTP server too. Can anyone recommend anything based on their experience ? Is this the best way to get an LTC timecode cheaply even ?
    Ok, I need a rack mounted hardware NTP clock that can sync to an NTP server to be a stratum 2 server in its own right. From the same clock I need an SMPTE/LTC timecode output on a BNC connector. Does anyone know of a suitable product ?
    Ok, I need a rack mounted hardware NTP clock that can sync to an NTP server to be a stratum 2 server in its own right. From the same clock I need an SMPTE/LTC timecode output on a BNC connector. Does anyone know of a suitable product ?
    Ok, I need a rack mounted hardware NTP clock that can sync to an NTP server to be a stratum 2 server in its own right. From the same clock I need an SMPTE/LTC timecode output on a BNC connector. Does anyone know of a suitable product ?

  • Christopher J says:

    when i go on to my web configurator it has an option there to schedule when wireless lan can turn on and off automatically. i want to set it to automatically turn off from 0200am and turn back on at 0700am. when i select these times and then apply the wireless on router turns off straight away even tho its not meant to switch off till 0700am. can someone help please?

  • musicistabest says:

    I’m trying to register at the forums for arch linux, but i cannot register because the time on my system is wrong. Can someone provide me with the code to change the time? I’m still new to this.

    Help would be GREATLY appreciated!

Leave a Reply to Robert Wolfe Cancel reply

%d bloggers like this: