Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux network time synchronization

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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

System time: the time in the current Linux Kernel.

Hardware time: the time when there is battery power on the motherboard.

Command to view system time: # date command to set system time: # date-set (month / day / year: minutes: seconds) example: # date-set "10:15 on 10-11-10" to view hardware time: # hwclock command to set hardware time: # hwclock-set-date = (month / day / year: minutes: seconds) the above mentioned manually sets the time to a point in time There may be an error with the time of the current network. Here's how to install the ntpdate tool yum-y install ntp ntpdate to synchronize the system time with the network time ntpdate cn.pool.ntp.orgor = > ntpdate-u ntp.api.bz write the system time to the hardware time hwclock-w

4. When viewing the hardware

Hwclock-show

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report