arrow_back
Back

Linux time zone and NTP: timedatectl, chrony, and clock sync

Andrew Dorokhov Andrew Dorokhov schedule 1 min read
menu_book Table of Contents

Time zone

Show a list of time zones:

sudo timedatectl list-timezones

Set a time zone:

sudo timedatectl set-timezone Europe/Kiev

Check if everything is set up:

sudo timedatectl

NTP synchronization

This will allow your server to stay in sync with other servers.

For NTP synchronization, we will use a service called ntp, which we can install from CentOS’s default repositories:

sudo yum install ntp

Start the service for this session:

sudo systemctl start ntpd

Enable the service so that it is automatically started each time the server boots:

sudo systemctl enable ntpd
code

Need Help with Development?

Happy to help — reach out via the contacts or go straight to my Upwork profile.

work View Upwork Profile arrow_forward
Next Article

Linux swap: swapfile, swapon, fstab, and memory tuning

arrow_forward