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:
- b) if you want to see all the timezone’s you can do timedatectl list-timezones
- 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?
- timedatectl set-ntp true
- systemctl enable chronyd (makes sure that ntp is enabled upon reboot)
- systemctl restart chronyd
- chronyc sources -v (ensures that new time servers are working with chronyd)