zoukankan      html  css  js  c++  java
  • Linux系统学习09-设置自动更新时间

    一、同步网络时间

    1.安装ntp时间同步工具   yum install ntp ntpdate

    2.开机自启

    更新时间:systemctl start ntpd

    开机自启:systemctl enable ntpd

    3. 查询时区 (使用timedatectl软件,默认是安装了的)

    查询状态:timedatectl status

    查看所有时区:timedatectl list-timezones

    设置“亚洲/上海”时区:timedatectl set-timezone Asia/Shanghai

    二、手动设置时间

    使用set-time开关以及HH:MM:SS(小时,分,秒)的时间格式:  timedatectl set-time 15:58:30

    使用set-time开关以及YY:MM:DD(年,月,日)的日期格式:     timedatectl set-time 20210208

    三、查看当前时间

    1.date

    2.

    始终相信美好的事情即将发生
  • 相关阅读:
    day08超市商品库存案例
    day07
    day06_03
    day06_02
    day06_01
    最简单的库存管理java案例
    Day05_homework
    方法的使用注意事项
    day05
    冒泡排序
  • 原文地址:https://www.cnblogs.com/subsea/p/14389114.html
Copyright © 2011-2022 走看看