इसे करने का एक तरीका यह है कि ntpउबंटू 18.04 में काम करता है। स्थापित करने के लिए निम्न कमांड चलाएँ ntp।
sudo apt install ntp
इसे स्थापित करने के बाद आप ntpq -pयह सुनिश्चित करने के लिए चला सकते हैं कि यह काम कर रहा है।
~$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
0.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
1.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
2.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
3.ubuntu.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.000
ntp.ubuntu.com .POOL. 16 p - 64 0 0.000 0.000 0.000
फिर अपनी /etc/crontabफ़ाइल में जोड़ें @reboot root /usr/sbin/ntpd -nताकि ntpdसिस्टम रिबूट होने पर स्वचालित रूप से शुरू हो जाए। अपने पसंदीदा संपादक का उपयोग करें जैसे geditया mousepadआप जो चाहें:
pkexec gedit /etc/crontab
जब लाइन जोड़ी जाती है तो इसे इस तरह का दिखना चाहिए:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
@reboot root /usr/sbin/ntpd -n
#
फिर सेटिंग्स को प्रभावी करने के लिए कंप्यूटर को रिबूट करें।
~$ timedatectl status
Local time: Wed 2018-06-13 06:55:35 MDT
Universal time: Wed 2018-06-13 12:55:35 UTC
RTC time: Wed 2018-06-13 12:55:36
Time zone: America/Denver (MDT, -0600)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
यदि आप अपने सर्वरों को एशिया पूल सर्वरों में बदलना चाहते हैं, तो उन्हें फ़ाइल के # Use servers from the NTP Pool Project.हिस्से में इस /etc/ntp.confतरह जोड़ें:
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.asia.pool.ntp.org
server 1.asia.pool.ntp.org
server 2.asia.pool.ntp.org
server 3.asia.pool.ntp.org
उम्मीद है की यह मदद करेगा!
timesyncd.confफ़ाइल:NTP=0.ur.ntp.srv 1.ur.ntp.srv; आप एक सर्वर पूल (वैश्विक पूल, या किसी क्षेत्र या देश के लिए विशिष्ट) प्रदान कर सकते हैं: pool.ntp.org/zone/@