Skip to content

How to Change Timezone on CentOS

homepage-banner

Introduction

Timezone settings are an essential part of any operating system. The correct timezone setting ensures that the system time is accurate and synchronized with the correct time. In this blog post, we will look at how to modify the timezone on CentOS.

Setting the Timezone on CentOS

Step 1 - Check the Current Timezone

Before modifying the timezone on CentOS, it is essential to check the current timezone. You can do this by running the following command in the terminal:

timedatectl

This command will display the current timezone of the system.

Step 2 - List Available Timezones

To list all available timezones, use the following command:

timedatectl list-timezones

This command will display a long list of available timezones. You can use the arrow keys to scroll through the list.

Step 3 - Set the Timezone

Once you have identified the timezone you want to set, run the following command:

sudo timedatectl set-timezone <timezone>

Replace <timezone> with the timezone you want to set. For example, to set the timezone to “America/New_York,” run the following command:

sudo timedatectl set-timezone America/New_York

After running this command, verify that the timezone has been set correctly by running the timedatectl command again.

Conclusion

Setting the correct timezone on CentOS is essential to ensure that the system time is accurate. By following the steps outlined in this blog post, you can easily modify the timezone on your CentOS system.

Leave a message