ITPub博客

首页 > Linux操作系统 > Linux操作系统 > linux下的系统时间、硬件时间设置

linux下的系统时间、硬件时间设置

原创 Linux操作系统 作者:xiaoli 时间:2013-02-03 17:54:30 0 删除 编辑

1、硬件时钟设置
[root@mosdb ~]# hwclock
Sat 02 Feb 2013 09:00:33 AM CST -0.551757 seconds
[root@mosdb ~]# hwclock --set --date="02/03/13 17:51:00"
[root@mosdb ~]#
[root@mosdb ~]# hwclock
Sun 03 Feb 2013 05:51:05 PM CST -0.483683 seconds
[root@mosdb ~]#

2、OS时钟设置
[root@mosdb ~]# date
Sat Feb 2 09:00:33 CST 2013
[root@mosdb ~]#
[root@mosdb ~]# date -s "2013-02-03 17:40"
Sun Feb 3 17:40:00 CST 2013
[root@mosdb ~]#


3、同步设置
hwclock --help
--hctosys set the system time from the hardware clock
--systohc set the hardware clock to the current system time

[root@mosdb ~]# hwclock --systohc
[root@mosdb ~]#
[root@mosdb ~]# hwclock --hctosys
[root@mosdb ~]#

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/60144/viewspace-1060186/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-09-01

  • 博文量
    68
  • 访问量
    207163