Linux network time synchronization

Linux 's time is divided into System Clock (system time) and Real Time Clock (hardware time, referred to as RTC).

System Time: refers to the time in the current Linux Kernel.

Hardware time: battery supply on board.

Check the system time command: #date setting command system time: #date -set (month / day / year hours: minutes: seconds) Example: #date -set "10/11/10 10:15" View hardware time command: # hwclock hardware setting command time: # hwclock -set -date = (month / day / year: minutes: seconds) of the above-mentioned time is manually set to a point in time, there may be an error with the current network time . Here are some methods to synchronize the time on the time server
  1. Ntpdate installation tool

yum -y install ntp ntpdate
  1. Set the system time synchronized with the network time

ntpdate cn.pool.ntp.orgor =>   ntpdate -u ntp.api.bz
  1. The system time to write hardware time

hwclock –w

4. Check the hardware

hwclock -show


Guess you like

Origin blog.51cto.com/14163835/2423694