Get the App
SLTechnology News&Howtos  ›  Servers  › 

Update time from time server with ntpdate [Centos time synchronization]

Shulou Source: shulou.com Published: 2022-06-02 15:32:10 09月22日 Update

Update time from time server with ntpdate [Centos time synchronization]

Update time from the time server with ntpdate

If your linux system does not have the command ntpdate at all

# yum install ntp

After installation, you don't have to do any configuration, just test it.

The code is as follows:

# ntpdate pool.ntp.org

If the display time is normal, prove that the synchronization is successful, and then add the following to the crontab:

# crontab-e

* / 5 * ntpdate pool.ntp.org # enter domain name or IP

Synchronize every five minutes

Tags: Time synchronization server update service success code content command domain name finished fundamental system test configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi NVidia Docker Linux macOS