

Run the following commands to change your current timezone to new timezone ~]# mv /etc/localtime /root/localtime. To check the current timezone, you can run the following command ~]# date To change the timezone in CentOS 5/6 or older, you can follow the steps below Check The Current Timezone To change timezone on CentOS/RHEL 6/5 we can simply link /etc/localtime file with correct timezone configuration file. You can set you new timezone by using the following command ~]# timedatectl set-timezone time_zoneĮxample: ~]# timedatectl set-timezone America/Detroit This command will display all the Asian timezones If you want to display the list of timezone for specific region, you can use the following command ~]# timedatectl list-timezones | grep Asia You can display the list of the available timezones by the following command ~]# timedatectl list-timezones Changing the Timezone by Creating a Symlink If you are running an older version of CentOS and the timedatectl command is not present on your system, you can change the timezone by symlinking /etc/localtime to the timezone file in the /usr/share/zoneinfo directory. Check Date of your Machine which includes Time.You can follow the steps given below to Set/Change timezone on CentOS 7 Checking Current Timezoneįirst of all, you should check your current timezone by running the following command in the terminal ~]# timedatectl.Root SSH Access to CentOS Machine (Root Needed to change TimeZone)Ĭheck Current Date, Time and TimeZone in CentOS 6/7.


For the time on the machine to reflect the change timezone. Follow the steps below to change the time zone. 1) How To Check Current Date, Time And Timezone Information In Linux Use the. timedatectl command used to display current timezone, list available timezones, and change timezone on the server. It can be used to query and change the system clock and its settings. /etc/sysconfig/clock: This file is holding timezone name on RHEL based systems. Wondering about TimeZone of your CentOS Machine and want to change it? Let’s follow this small guide to check and change current TimeZone in CentOS 6 and Centos 7. Save the file /etc/sysconfig/clock and on next reboot the system will be set to the defined timezone. Change timezone using timedatectl command You can use timedatectl command to safely change timezone when you don’t want to deal with system files and fear of messing them up.
