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.

$ sudo ntpdate

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

$ ntpdate -q

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

$ sudo ntpdate -s

You Might Also Like