sudonano /etc/systemd/timesyncd.conf 复制代码 在文件中,您可以添加或修改 NTP 服务器地址。例如: [Time]NTP=10.3.170.32FallbackNTP=0.debian.pool.ntp.org1.debian.pool.ntp.org2.debian.pool.ntp.org3.debian.pool.ntp.org 复制代码 重启systemd-timesyncd 服务 保存并退出编辑器后,重启systemd-timesync...
第一步,检查systemd-timesyncd是否已经安装。在终端中输入以下命令: sudo apt-get install systemd-timesyncd 如果已经安装,则不需要重复安装。 第二步,打开/etc/systemd/timesyncd.conf文件,将其中的NTP服务器地址修改为本地服务器所在地的NTP服务器地址。 第三步,启动systemd-timesyncd服务。输入以下命令: sudo...
$sudonano/etc/systemd/timesyncd.conf.d/server-ntp.conf### 输入以下内容[Time]NTP=ntp.tencent.com ntp.aliyun.com 然后重启对应服务: $sudosystemctl restart systemd-timesyncd.service# 再次查看 NTP 服务状态$sudosystemctl status systemd-timesyncd.service# 得到类似结果:systemd-timesyncd.service - ...
你可以通过编辑/etc/systemd/timesyncd.conf文件来配置自定义的NTP服务器。 打开文件: bash sudo nano /etc/systemd/timesyncd.conf 找到[TimeSync]部分,并修改或添加NTP服务器地址。例如: ini [TimeSync] NTP=ntp.example.com 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3....
# See timesyncd.conf(5)fordetails [Time] #Servers=0.debian.pool.ntp.org1.debian.pool.ntp.org2.debian.pool.ntp.org3.debian.pool.ntp.orgServers=ntp.ubuntu.com 这样每次开机就会从ntp.ubuntu.com自动更新时间了。 参见:How to manage system services on Debian Jessie ...
Time zone: Asia/Shanghai (CST, +0800)NTP enabled: yesNTP synchronized: no RTC in local TZ: no DST active: n/a 打开/etc/systemd/timesyncd.conf: # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it ...
conf Active: active (running) since Tue 2018-09-04 16:14:23 EDT; 1s ago Docs: man:systemd-timesyncd.service(8) Main PID: 3399 (systemd-timesyn) Status: "Synchronized to time server 198.60.22.240:123 (0.debian.pool.ntp.org)." Tasks: 2 (limit: 4915) CGroup: /system.slice/systemd...
sudo systemctl restart systemd-timesyncd 1. 确认状态 sudo timedatectl timesync-status 1. 使用Chrony 安装Chrony 并配置 NTP 服务器以进行时间调整。NTP 使用 123/UDP。 sudo apt -y install chrony vim 1. 您可以更改 NTP 服务器或使用默认服务器。 $ sudo vim /etc/chrony/chrony.conf pool 2.debian...
在Debian Linux系统中,可以通过修改`/etc/systemd/timesyncd.conf`配置文件中的NTP服务器列表来实现这一功能 当主NTP服务器不可用时,系统将自动切换到备用NTP服务器进行时间同步 3.使用硬件时钟作为时间源 在某些特殊情况下,可能需要将硬件时钟作为系统时间的主要时间源 ...
修改/etc/systemd/timesyncd.conf,把NTP设为国内的或者自建的NTP服务器 [Time] NTP=ntp7.aliyun.com NTP=ntp6.aliyun.com 修改完成后,需要restart后这个配置才生效 sudo systemctl restart systemd-timesyncd.service 如果以上systemd-timesyncd.service因为什么原因而不存在,则可通过以下命令修复: ...