sudo timedatectl set-timezone Asia/Shanghai 再次执行 timedatectl 命令查看时区 配置 修改/etc/systemd/timesyncd.conf,把NTP设为国内的或者自建的NTP服务器 [Time] NTP=ntp7.aliyun.com NTP=ntp6.aliyun.com 修改完成后,需要restart后这个配置才生效 sudo systemctl restart systemd-timesyncd.service 如果以上...
sudo timedatectl set-timezone Asia/Shanghai 再次执行 timedatectl 命令查看时区 配置 修改/etc/systemd/timesyncd.conf,把NTP设为国内的或者自建的NTP服务器 [Time] NTP=ntp7.aliyun.com NTP=ntp6.aliyun.com 修改完成后,需要restart后这个配置才生效 sudo systemctl restart systemd-timesyncd.service 如果以上...
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...
你可以通过编辑/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....
第一步,检查systemd-timesyncd是否已经安装。在终端中输入以下命令: sudo apt-get install systemd-timesyncd 如果已经安装,则不需要重复安装。 第二步,打开/etc/systemd/timesyncd.conf文件,将其中的NTP服务器地址修改为本地服务器所在地的NTP服务器地址。
$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 - ...
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...
sudonano /etc/systemd/timesyncd.conf 以上图为例,修改完后按下 ctrl + O 保存,再按下 ctrl + x 退出。 接着我们查看一下我们的修改结果 sudotimedatectl status 如上图所示就没问题。 需要主意的是NTP synchronized必须是 yes。如果不是的话可以输命令: ...
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 ...
在Debian Linux系统中,可以通过修改`/etc/systemd/timesyncd.conf`配置文件中的NTP服务器列表来实现这一功能 当主NTP服务器不可用时,系统将自动切换到备用NTP服务器进行时间同步 3.使用硬件时钟作为时间源 在某些特殊情况下,可能需要将硬件时钟作为系统时间的主要时间源 ...