linux:ntp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:ntp [2023/03/22 16:52] – admin | linux:ntp [2025/04/02 19:41] (current) – [client] gsys | ||
---|---|---|---|
Line 4: | Line 4: | ||
<code bash> | <code bash> | ||
- | rcntp ntptimeset | + | rcntp ntptimeset |
+ | ntpq -p #show peers | ||
+ | timedatectl | ||
+ | sudo timedatectl set-ntp true | ||
+ | sudo timedatectl set-local-rtc 0 | ||
+ | systemctl status systemd-timesyncd | ||
+ | sudo systemctl restart systemd-timesyncd | ||
</ | </ | ||
Line 13: | Line 19: | ||
timedatectl list-timezones | egrep -o " | timedatectl list-timezones | egrep -o " | ||
sudo timedatectl set-timezone " | sudo timedatectl set-timezone " | ||
+ | </ | ||
+ | |||
+ | ===== chrony ===== | ||
+ | |||
+ | '' | ||
+ | < | ||
+ | server 192.168.1.1 | ||
+ | allow 10.1.0.0/16 | ||
+ | allow 192.168.1.0/ | ||
+ | </ | ||
+ | |||
+ | ==== client ==== | ||
+ | < | ||
+ | chronyc activity | ||
+ | chronyc 'burst 4/ | ||
+ | chronyc -N sources | ||
</ | </ | ||
linux/ntp.1679500359.txt.gz · Last modified: 2024/02/17 19:03 (external edit)