Centos date 设置自定义时间
【1】手动修改
(1)设置日期
# date -s 20190315
(2)设置时间
# date -s 15:23:34
(3)设置日期和时间
# date -s "20190315 15:12:23"
命令执行结果如下图:

如上三种方式设置自定义时间。
【2】自动同步
(1)安装ntpdate工具
# yum -y install ntp ntpdate
(2)设置系统时间与网络时间同步
# ntpdate cn.pool.ntp.org
(3)将系统时间写入硬件时间
# hwclock --systohc
(4)强制系统时间写入CMOS中防止重启失效
# hwclock -w
或clock -w
命令执行结果如下图:

Good Good Study, Day Day Up.
顺序 选择 循环 总结
Centos date 设置自定义时间的更多相关文章
- linux date 设置系统时间
设置 系统时间 注意时间格式 date -s "date" [root@localhost c]# date -s "2019-05-29 10:58:00" ...
- CentOS 7 设置自定义开机启动,添加自定义系统服务
详细文档,http://www.linuxidc.com/Linux/2015-04/115937.htm 摘自: http://www.centoscn.com/CentOS/config/2015 ...
- centos7设置系统时间与网络时间同步
Linux的时间分为System Clock(系统时间)和Real Time Clock (硬件时间,简称RTC). 系统时间:指当前Linux Kernel中的时间. 硬件时间:主板上有电池供电的时 ...
- ubuntu设置系统时间与网络时间同步
ubuntu设置系统时间与网络时间同步 Linux的时间分为System Clock(系统时间)和Real Time Clock (硬件时间,简称RTC). 系统时间:指当前Linux Ker ...
- ubuntu设置系统时间与网络时间同步和时区
Linux的时间分为System Clock(系统时间)和Real Time Clock (硬件时间,简称RTC). 系统时间:指当前Linux Kernel中的时间. 硬件时间:主板上有电池供电的时 ...
- 【第十九篇】laydate设置起始时间,laydate设置开始时间和结束时间
laydate设置开始时间后,结束时间不可小于已选择的开始时间 laydate设置结束时间后,开始时间不可小于已选择的结束时间 //设置开始时间 var startDate = laydate.ren ...
- [转] 设置linux时间为网络时间
[From] https://blog.csdn.net/weixin_35852328/article/details/79506453 Linux的时间分为System Clock(系统时间)和R ...
- CentOS 7 设置日期和时间
现代操作系统分为以下两种类型的时钟: 实时时钟(Real-Time Clock,RTC),通常称为硬件时钟(一般是系统主板上的集成电路),它完全独立于操作系统的当前状态,即使在计算机关闭时也能运行. ...
- CentOS 7.X 设置系统时间
在CentOS 6版本,时间设置有date.hwclock命令, 硬件时钟和系统时钟 (1) 硬件时钟 RTC(Real-Time Clock)或CMOS时钟,一般在主板上靠电池供电,服务器断电后也会 ...
随机推荐
- flex skin
原文地址:http://blog.163.com/to_yht/blog/static/1227257742009741359326/当程序做完后,你是否还在为老套的flex组件默认效果发愁?是否还在 ...
- SQL Server 2008 R2 SP3 and SQL Server 2008 SP4 are now available!
时间 2014-10-02 00:00:00 SQL Server Team Blog 原文 http://blogs.technet.com/b/dataplatforminsider/arc ...
- 鼠标悬浮tip 显示
鼠标悬浮tip 显示 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> &l ...
- eclipse中jar包打断点
eclipse中jar包打断点 1. 下载工具 链接:http://pan.baidu.com/s/1dEF5tqL 密码:md4m 2. 增加jadeclipse功能 把 net.sf.jadcli ...
- 使用ASIHTTPRequest 编译提示找不到"libxml/HTMLparser.h"的解决方法
使用ASIHTTPRequest xcode编译提示找不到"libxml/HTMLparser.h",解决方法如下: 1>.在xcode中左边选中项目的root节点,在中间编 ...
- 用curl获取https请求时出现错误的处理
今天一个同事反映,使用curl发起https请求的时候报错:“SSL certificate problem, verify that the CA cert is OK. Details: erro ...
- Python连接mongodb提取部分字段内数据并写入txt文件
#coding=utf-8 import sys reload(sys) sys.setdefaultencoding('utf-8') from pymongo import MongoClient ...
- tar命令解压缩出错
[root@zhoucentos share1]# tar zxvf otp_src_19..tar.gz gzip: stdin: not in gzip format tar: Child ret ...
- ElasticSearch高级查询
ElasticSearch高级查询 https://www.imooc.com/video/15759/0 ElasticSearch查询 1,子条件查询:特定字段查询所指特定值 1.1query c ...
- Android之TextView的Span样式源代码剖析
Android中的TextView是个显示文字的的UI类.在现实中的需求中,文字有各式各样的样式,TextView本身没有属性去设置实现.我们能够通过Android提供的 SpannableStrin ...