博客
关于我
Linux 命令之 timedatectl -- 查看系统当前时区设置
阅读量:364 次
发布时间:2019-03-04

本文共 457 字,大约阅读时间需要 1 分钟。

timedatectl命令是用于管理系统时区设置的有效工具。以下是关于如何查看和设置系统时区的详细说明。

查看当前时区设置

可以使用以下命令查看系统当前的时区设置:

timedatectl

此命令会输出当前系统的时区信息。

列出所有可用的时区

如果需要了解系统支持哪些时区,可以使用以下命令:

timedatectl list-timezones

这会显示一个包含所有可用时区的列表,格式为区域/城市。

设置当前时区

要更改系统时区,需要使用以下命令,并记得使用sudo权限:

sudo timedatectl set-timezone [时区名称]

例如,设置美国纽约时区:

sudo timedatectl set-timezone America/New_York

设置日期和时间

如果需要手动设置日期和时间,可以使用以下命令:

sudo timedatectl set-time YYYY-MM-DDsudo timedatectl set-time HH:MM:SS

请确保输入正确的日期格式和时间格式。

转载地址:http://mnjr.baihongyu.com/

你可能感兴趣的文章
thinkphp 常用SQL执行语句总结
查看>>
Oracle:ORA-00911: 无效字符
查看>>
Text-to-Image with Diffusion models的巅峰之作:深入解读 DALL·E 2
查看>>
Tensorflow.python.framework.errors_impl.ResourceExhaustedError:无法分配内存[操作:AddV2]
查看>>
TCP基本入门-简单认识一下什么是TCP
查看>>
tableviewcell 中使用autolayout自适应高度
查看>>
Symbolic Aggregate approXimation(SAX,符号聚合近似)介绍-ChatGPT4o作答
查看>>
Orcale表被锁
查看>>
svn访问报错500
查看>>
sum(a.YYSR) over (partition by a.hy_dm) 不需要像group by那样需要分组函数。方便。
查看>>
ORCHARD 是什么?
查看>>
Struts2中使用Session的两种方法
查看>>
Stream API:filter、map和flatMap 的用法
查看>>
STM32工作笔记0032---编写跑马灯实验---寄存器版本
查看>>
order by rand()
查看>>
SSM(Spring+SpringMvc+Mybatis)整合开发笔记
查看>>
Orderer节点启动报错解决方案:Not bootstrapping because of 3 existing channels
查看>>
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement profile
查看>>
sql查询中 查询字段数据类型 int 与 String 出现问题
查看>>
org.apache.commons.beanutils.BasicDynaBean cannot be cast to ...
查看>>