Basic configuration-NTP

System environment: CentOS 7.6

timedatectl with ctl is a new set of control tools for CentOS7.

Compared with the date command, the display of whether the NTP function is turned on and the NTP synchronization status is added.

##时间控制命令
[root@test ~]# timedatectl 
      Local time: Mon 2020-04-20 18:16:35 EDT
  Universal time: Mon 2020-04-20 22:16:35 UTC
        RTC time: Mon 2020-04-20 22:16:35
       Time zone: America/New_York (EDT, -0400)
     NTP enabled: yes
NTP synchronized: no
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2020-03-08 01:59:59 EST
                  Sun 2020-03-08 03:00:00 EDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2020-11-01 01:59:59 EDT
                  Sun 2020-11-01 01:00:00 EST

##参数设置

  set-timezone ZONE        Set system time zone
  list-timezones           Show known time zones //列出时区列表,或/usr/share/zoneinfo/zone.tab查看
  set-ntp BOOL             Control whether NTP is enabled //"0"关闭,"1"开启
[root@test ~]# 

 

Published 4 original articles · Likes0 · Visits 55

Guess you like

Origin blog.csdn.net/qq_24814027/article/details/105646369