zoukankan      html  css  js  c++  java
  • centos系统时间修改

    1、安装ntpdate工具

    [root@jack ~]#  yum -y install ntp ntpdate

    2、当前系统时间:

    [root@jack ~] # date

    3、当前硬件时间:

    [root@jack ~]# hwclock --show

    4、修改想要的系统时间:

    [root@jack ~]# date -s "2020-01-01 10:10:30"

    5、同步网络时间:

    [root@jack ~]#  ntpdate 0.asia.pool.ntp.org

      通过时间服务器对系统时间进行同步,0.asia.pool.ntp.org并不是固定的服务器地址,可以选择time.nist.gov、time.nuri.net、0.asia.pool.ntp.org、1.asia.pool.ntp.org、2.asia.pool.ntp.org、3.asia.pool.ntp.org中任意一个,或者用阿里云的NTP

    阿里云提供了7个NTP时间服务器(也就是Internet时间同步服务器地址)

    ntp1.aliyun.com
    ntp2.aliyun.com
    ntp3.aliyun.com
    ntp4.aliyun.com
    ntp5.aliyun.com
    ntp6.aliyun.com
    ntp7.aliyun.com

    6、将系统时间 写入 硬件(bios时间)以防止系统重启导致修改时间失效:

    [root@jack ~]# hwclock --systohc

  • 相关阅读:
    Intersection
    B-number
    Intersecting Lines
    Segments
    G. Swapping Places
    Toy Storage
    TOYS
    哈密顿绕行世界问题
    java试题复盘——11月25日
    java试题复盘——11月13日
  • 原文地址:https://www.cnblogs.com/jackron/p/12381843.html
Copyright © 2011-2022 走看看