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 is the use of the ntpdate command under Linux

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces "what is the use of the ntpdate command under Linux". In the daily operation, I believe that many people have doubts about the use of the ntpdate command under Linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubt of "what is the use of the ntpdate command under Linux?" Next, please follow the editor to study!

Brief introduction to Command

The ntpddate command is used to set the date and time using Network timing Protocol (NTP). It can also be used to synchronize time, and this command requires root administrator privileges to execute.

[root@centos7 ~] # ntpdate-bash: ntpdate: command not found [root@centos7 ~] # yum install ntpdate-y syntax format

Ntpdate [- b] [- d] [- s] [- u] [- aKeyid] [- eAuthenticationDelay] [- kKeyFile] [- oVersion] [- pSamples] [- tTimeOut] Server...

Option description-aKeyid # uses Keyid to authenticate all packets-b # increases the time of the clock by calling the settimeofday subroutine-d # specifies debugging mode-eAuthenticationDelay # specifies the number of seconds to delay authentication processing. -oVersion # specifies the implementation of the NTP version used-pSamples # specifies the number of samples taken from each server-s # specifies log operations-tTimeOut # specifies the time to wait for a response-u # specifies an example of sending packets using an unprivileged port

Synchronization time

[root@centos7 ~] # date Sun Mar 28 13:09:22 EDT 2021 [root@centos7 ~] # ntpdate 0.centos.pool.ntp.org 28 Mar 23:11:13 ntpdate [5516]: step time server 182.92.12.11 offset 36090.505486 sec [root@centos7 ~] # date Sun Mar 28 23:11:21 EDT 2021 [root@centos7] # ntpdate 0.centos.pool.ntp.org 28 Mar 23:11:55 ntpdate [5519]: step time server 182.92.12.11 Offset-0.722305 sec [root@centos7 ~] # ntpdate asia.pool.ntp.org Hwclock-w 28 Mar 23:12:28 ntpdate [5520]: adjust time server 133.243.238.163 offset-0.013789 sec this is the end of the study on "what is the use of ntpdate commands under Linux". I hope I can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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