在Archlinux上进行时钟同步
source link: https://www.lujun9972.win/blog/2018/10/16/%E5%9C%A8archlinux%E4%B8%8A%E8%BF%9B%E8%A1%8C%E6%97%B6%E9%92%9F%E5%90%8C%E6%AD%A5/index.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
在Archlinux上进行时钟同步
最近笔记本上的时钟不知为何快了5分钟,导致与AnkiWeb同步时总是提示同步失败。
想要进行时钟同步却发现不知道怎么操作。在查询了ArchWiki后发现挺简单的,这里简单记录一下,以防忘记。
systemd本身提供了一个简单的SNTP客户端 /usr/lib/systemd/systemd-timesyncd
,可以用来从远程NTP服务器查询时间
因此,同步时间只需要手工运行
sudo /usr/lib/systemd/systemd-timesyncd
systemd-timesyncd
会从下面列表中读取ntp服务器的地址:
/etc/systemd/timesyncd.conf /etc/systemd/timesyncd.conf.d/*.conf /run/systemd/timesyncd.conf.d/*.conf /usr/lib/systemd/timesyncd.conf.d/*.conf
事实上,你也没有必要老是手工起 systemd-timesyncd
, 它本身就是 systemd
中预定义好的一个service。
你可以通过
sudo systemctl enable systemd-timesyncd
timedatectl set-ntp true
来开启这个服务。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK