How to set the timezone in Ubuntu and CentOS and some other useful time commands

To set the timezone in CentOS or Ubuntu, do the following:

timedatectl set-timezone Africa/Johannesburg

Other useful date time commands

This one shows information compared to time sync:

timedatectl

Check if ntp service is running:

service ntp status

Install a more sophisticated time server service:

apt install ntp

Reference

Share this article

1 thought on “How to set the timezone in Ubuntu and CentOS and some other useful time commands”

Leave a Reply

Your email address will not be published.

Scroll to Top