SoFunction
Updated on 2025-03-02

How to use ntp to automatically connect to calibration time for Linux

Linux uses ntp to automatically connect to calibration time

1. Check the current time

date

2. Install ntp

yum install ntpdate -y

3. Calibration time

Select the right ntp server

Many can be found online

ntpdate -u 
or
ntpdate -u 

The following command appears

Indicates that calibration has been completed

27 Sep 09:21:34 ntpdate[27152]: adjust time server 84.16.73.33 offset 0.001199 sec

4. Modify the time zone

If the machine time zone is different from the local area

Use the following method to modify the time zone

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

Summarize

The above is personal experience. I hope you can give you a reference and I hope you can support me more.