Basic NTP Configuration (using chronyc) and Timedate command

 

Basic NTP Configuration (using chronyc) and Timedate command

 

Common usages and helpful commands

  • a) How to determine the timezone to use: You should use the tzselect command. It will provide you many different prompts, until the last one which will provide the below information:

You can make this change permanent for yourself by appending the line

        TZ='America/Vancouver'; export TZ

to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you

can use the /usr/bin/tzselect command in shell scripts:

America/Vancouver

  1. b) if you want to see all the timezone’s you can do timedatectl list-timezones
  2. c) You can follow the below instructions or run the below command:

             timedatectl set-timezone America/Vancouver

  • How to update the NTP time services (to synchronize times based on a Network Time Protocol server pool- to ensure servers are all using the same time):

You edit the /etc/chrony.conf file with the necessary ntp pools required.

  • How to enable NTP and ensure the changes are applied?
  1. timedatectl set-ntp true
  2. systemctl enable chronyd (makes sure that ntp is enabled upon reboot)
  3. systemctl restart chronyd
  4. chronyc sources -v (ensures that new time servers are working with chronyd)