Configure Linux Time Zone Using Shell Commands


AllCloud Blog:
Cloud Insights and Innovation

Configure Time Zone Using Shell Commands

  • Configure /etc/sysconfig/clock file to the requested time zone, all time zones can be find in /usr/share/zoneinfo
vi /etc/sysconfig/clock
ZONE="Israel"
  • Remove existing localtime file and creating new localtime symbolic link to the requested time zone file
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/Israel /etc/localtime

For more information on time, date and time zone configuration please check the following: https://www.vanemery.com/Linux/RH-Linux-Time.html

Lahav Savir

Founder and CTO, Cloud Platforms

Read more posts by Lahav Savir