ubuntu设置系统时间与网络时间同步
2015-09-11 01:44
357 查看
Linux的时间分为System Clock(系统时间)和Real Time Clock (硬件时间,简称RTC)。
系统时间:指当前Linux Kernel中的时间。
硬件时间:主板上有电池供电的时间。
查看系统时间的命令: #date
设置系统时间的命令: #date –set(月/日/年 时:分:秒)
例:#date –set “10/11/10 10:15”
查看硬件时间的命令: # hwclock
设置硬件时间的命令: # hwclock –set –date = (月/日/年 时:分:秒)
上述提到的是手动设置时间到一个时间点,可能与当前网络的时间有误差。
下面介绍一下与时间服务器上的时间同步的方法
1. 安装ntpdate工具
# sudo apt-get install ntpdate
2. 设置系统时间与网络时间同步
# ntpdate cn.pool.ntp.org
3. 将系统时间写入硬件时间# hwclock --systohc
系统时间:指当前Linux Kernel中的时间。
硬件时间:主板上有电池供电的时间。
查看系统时间的命令: #date
设置系统时间的命令: #date –set(月/日/年 时:分:秒)
例:#date –set “10/11/10 10:15”
查看硬件时间的命令: # hwclock
设置硬件时间的命令: # hwclock –set –date = (月/日/年 时:分:秒)
上述提到的是手动设置时间到一个时间点,可能与当前网络的时间有误差。
下面介绍一下与时间服务器上的时间同步的方法
1. 安装ntpdate工具
# sudo apt-get install ntpdate
2. 设置系统时间与网络时间同步
# ntpdate cn.pool.ntp.org
3. 将系统时间写入硬件时间# hwclock --systohc
相关文章推荐
- tcp/ip协议入门
- 网络-性能调优
- iOS第三方网络图片加载- SDWebImage笔记(转)
- HTTP概念进阶
- ./configure: error: the HTTP rewrite module requires the PCRE library解决
- 网络部分(三)
- 网络数据包头部在linux网络协议栈中的变化
- HTTP请求的基本概念 HTTP请求头和响应头的含义
- nginx中http的fastcgi模块的配置指令1
- http://www.csdn.net/article/2015-08-06/2825395
- 探索大数据之如何挖掘社交网络
- CCNA笔记——802规定,网络层,传输层,会话层,表示层,应用层,封装
- 网络布局算法之【FR算法(Fruchterman-Reingold)】
- 计算机网络之TCP
- Linux网络管理命令
- UVA - 1658(网络流经典拆点方法)
- 使用事件驱动模型实现高效稳定的网络服务器程序
- Web开发设计(一)
- 虚拟机联网问题
- 网络编程