Networking HowTos
Networking HowTos

Update time from network time server on Linux

December 10, 2012 Linux

To update the time on a Linux installation, simply run the following command:

$ sudo ntpdate <time server address>

Replacing <time server address> with a valid NTP time server address.
eg:

$ sudo ntpdate pool.ntp.org

If you only want to query the time, without updating your system, use the following command:

$ ntpdate -q pool.ntp.org

To update the time, without outputting any log information to standard output (handy for a cron job), use the following command:

$ sudo ntpdate -s pool.ntp.org

You Might Also Like