linux修改系统日期与时间

青春壹個敷衍的年華 提交于 2019-12-17 02:26:51

修改时区cp /usr/share/zoneinfo/UTC /etc/localtime

 

[hayuk@localhost qinghua]$ date
2012年 11月 02日 星期五 08:04:30 CST

[hayuk@localhost qinghua]$ su - root
口令:

[root@localhost ~]# cp /usr/share/zoneinfo/UTC /etc/localtime
cp:是否覆盖“/etc/localtime”? y
[root@localhost ~]# date
2012年 11月 02日 星期五 00:07:30 UTC

 

修改系统日期与时间date -s "2012-11-03 10:25:25"

[root@localhost ~]# date
2012年 11月 02日 星期五 00:08:27 UTC

[root@localhost ~]# date -s "2012-11-03 10:25:25"
2012年 11月 03日 星期六 10:25:25 UTC
[root@localhost ~]# date
2012年 11月 03日 星期六 10:25:27 UTC

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!