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

What are the clocks of Linux and the addresses of commonly used time synchronization servers?

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article introduces you to Linux clock and commonly used time synchronization server address, the content is very detailed, interested friends can refer to, I hope to help you.

In Linux, the main commands for clock viewing and setting are date, hwclock, and clock. Clock and hwclock are similar in usage, except that the clock command supports Alpha hardware system in addition to x86 hardware system. Since most users currently use x86 hardware architecture, you can view these two commands as one command to learn.

1. Use date command in virtual terminal to view and set system time

To view the operation of the system clock:

# date

To set the system clock:

# date 091713272003.30

Common Settings Format:

# date month day year. seconds

2. Use the hwclock or clock command to view and set the hardware clock

View the operation of the hardware clock:

# hwclock --show or # clock --show Wednesday, September 17, 2003 13:24:11 seconds-0.482735 seconds

To set the hardware clock:

# hwclock --set --date="09/17/2003 13:26:00" or # clock --set --date="09/17/2003 13:26:00"

Common format: hwclock/clock --set --date="MM/DD/YYYY: MM: SS."

3. Synchronizing system clock and hardware clock

Linux system (I use Red Hat 8.0, other systems have not done experiments) after the default restart, hardware clock and system clock synchronization. If it is inconvenient to restart (servers rarely restart), use the clock or hwclock command to synchronize the system clock with the hardware clock.

Hardware clock synchronization with system clock:

# hwclock --hctosys or # clock --hctosys In the above command, --hctosys stands for Hardware Clock to SYStem clock.

System clock and hardware clock synchronization:

# hwclock --systohc or # clock --systohc

2. We now want to synchronize the LINUX server with a time synchronization server on the network. The operation process is as follows:

ntpdate 210.72.145.44

Execute the synchronization time command prompt: the NTP socket is in use, exiting, and then execute the synchronization time command after stopping the time service (/etc/init.d/ntpd stop).

China can probably use NTP time server address

server 133.100.11.8 preferserver 210.72.145.44server 203.117.180.36server 131.107.1.10server time.asia.apple.comserver 64.236.96.53server 130.149.17.21server 66.92.68.246server www.freebsd.orgserver 18.145.0.30server clock.via.netserver 137.92.140.80server 133.100.9.2server 128.118.46.3server ntp.nasa.govserver 129.7.1.66server ntp-sop.inria.frserver 210.72.145.44 (IP address of China National Time Service Center server)server ntp.sjtu.edu.cn (NTP server address of Shanghai Jiaotong University Network Center)

================================

Other Universities NTP Address: Server List:

s1a.time.edu.cn University 010-62795818-6105s1c.time.edu.cn Peking University 010-62753007s1d.time.edu.cn Southeast University 025-3794342-309s1e.time.edu.cn Tsinghua University 010-62795818-6105s2a.time.edu.cn Beijing University of Posts and Telecommunications 010-62795818-6105s2c.time.edu.cn 010-62283044-8003s2d.time.edu.cn Network Center s2e.time.edu.cn Northwest Network Center 029-2669037s2f.time.edu.cn Southeast China Network Center 024-23966854s2g.time.edu.cn Sichuan University Network Management Center 028-85414820s2j.time.edu.cn Dalian University of Technology Network Center 021-62932901-8101s2h.time.edu.cn CERC NET Guilin master node 0773-5845246s2m.time.edu.cn Beijing University time.jmu.edu.cn about Linux clock and commonly used time synchronization server address what to share here, I hope the above content can have some help for everyone, you can learn more knowledge. 0411-4708642s2k.time.edu.cn 010-62795818-6105s2b.time.edu.cn 010s1b.time.edu.cn If you think the article is good, you can share it so that more people can see it.

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