赞
踩
linux命令之hwclock
linux命令hwclock是用来显示硬件时钟
hwclock [参数]
参数 | 说明 |
-s | 让系统时间同步硬件时间 |
-w | 让硬件时间同步系统时间 |
命令:
ntpdate pool.ntp.org
- [root@rhel77 ~]# yum install ntpdate
- Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
- This system is not registered with an entitlement server. You can use subscription-manager to register.
- Package ntpdate-4.2.6p5-29.el7.x86_64 already installed and latest version
- Nothing to do
- [root@rhel77 ~]# ntpdate pool.ntp.org
- 21 Nov 08:56:14 ntpdate[3361]: adjust time server 202.118.1.130 offset -0.019736 sec
- [root@rhel77 ~]#
命令:
hwclock
- [root@rhel77 ~]# hwclock
- Tue 21 Nov 2023 08:56:34 AM CST -0.615450 seconds
- [root@rhel77 ~]#
命令:
hwclock -s
- [root@rhel77 ~]# hwclock -s
- [root@rhel77 ~]#
命令:
hwclock -w
- [root@rhel77 ~]# hwclock -w
- [root@rhel77 ~]#
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。