Linux time synchronization or settings

Check the current time of the system under Linux Use the date command to check the current time.
If you want to directly synchronize the system time to the Internet time, use the following method

to use ntpdate for time synchronization under Linux
1. To install ntpdate, execute the following command

# yum install ntpdate -y
2. Manually To synchronize network time, execute the following command to synchronize time from time.nist.gov

# ntpdate 0.asia.pool.ntp.org
  If the above time server is unavailable, you can also choose the following server to synchronize time

  time.nist.gov

  time. nuri.net

  0.asia.pool.ntp.org

  1.asia.pool.ntp.org

  2.asia.pool.ntp.org

  3.asia.pool.ntp.org


To manually set the system time, use date - s "20180212 18:30:50"

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326048863&siteId=291194637