当前位置:首页 > Linux > Debian > 正文内容

Debian中修改时区

deboss3年前 (2024-01-08)Debian169

获取当前系统可用的时区名称

timedatectl list-timezones

记下符合你要求的时区,以 root 或者其他有 sudo 权限的用户身份,运行下面的命令:

sudo timedatectl set-timezone your_time_zone# 如想要将系统时区设置为 Asia/Shanghai,可用以下命令
# timedatectl set-timezone Asia/Shanghai

直接运行 timedatectl 命令检查是否成功,成功后应输出以下信息:

               Local time: Wed 2022-04-06 13:30:26 CST
           Universal time: Wed 2022-04-06 05:30:26 UTC
                 RTC time: Wed 2022-04-06 05:30:27
                Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no


扫描二维码推送至手机访问。

版权声明:本文由四川方脑壳发布,如需转载请注明出处。

本文链接:https://sc.six666.cn/?id=11

分享给朋友:

“Debian中修改时区” 的相关文章

"bash:shutdown:command not found"或"bash:reboot:command not found"的解决方法

"bash:shutdown:command not found"或"bash:reboot:command not found"的解决方法

解决“bash:reboot:找不到命令”的问题在虚拟机装了个Debian,结果被关机重启命令给弄懵了,能用systemctl reboot命令来重启,reboot不行。查了一下:reboot只是一个 systemctl reboot的一个连接,所以,当执行reboot时,其实就是执行 system...