How to Synchronizing the system clock with a remote server in CentOS /Ubuntu Linux

To enable automatic synchronization of the system clock with a remote server , you can use ‘ timedatectl’ command as a root.

To check NTP status :

[root@localhost ~]# timedatectl

Local time: Sat 2017-12-09 22:01:35 IST

Universal time: Sat 2017-12-09 16:31:35 UTC

RTC time: Sat 2017-12-09 16:31:35

Time zone: Asia/Kolkata (IST, +0530)

NTP enabled: no
NTP synchronized: yes

RTC in local TZ: no

DST active: n/a

[root@localhost ~]#

Synchronizing the system clock with a remote server :

[root@localhost ~]# timedatectl set-ntp yes

[root@localhost ~]# timedatectl
Local time: Sat 2017-12-09 22:11:20 IST

Universal time: Sat 2017-12-09 16:41:20 UTC

RTC time: Sat 2017-12-09 16:41:20

Time zone: Asia/Kolkata (IST, +0530)

NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
[root@localhost ~]#

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s