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/11/06 12:26] (current) – [chrony] 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/ | ||
| + | </ | ||
| + | |||
| + | restart chrony service | ||
| + | < | ||
| + | systemctl restart chronyd | ||
| + | </ | ||
| + | |||
| + | check if new ntp server is used | ||
| + | < | ||
| + | journalctl --since -1h -u chronyd | ||
| + | </ | ||
| + | ==== client ==== | ||
| + | < | ||
| + | chronyc activity | ||
| + | chronyc 'burst 4/ | ||
| + | chronyc -N sources | ||
| </ | </ | ||
linux/ntp.1679500359.txt.gz · Last modified: (external edit)