How to change timezone linux command line

In this article we will tell you to change timezone linux command line. Location of the local time file
Linux looks at /etc/localtime to determine the current time of your machine. This can either be a symbolic link to the correct time zone or a direct copy of the time zone file.

Please use following commands for changing the timezone.

[root@ip-kapilk-pc kapil]# date
Fri Jan 22 06:35:11 MST 2010

[root@ip-kapilk-pc kapil]# ln -sf /usr/share/zoneinfo/
Africa/ Cuba GMT0 Japan Poland Universal
America/ EET GMT-0 Kwajalein Portugal US/
Antarctica/ Egypt GMT+0 Libya posix/ UTC
Arctic/ Eire Greenwich MET posixrules WET
Asia/ EST Hongkong Mexico/ PRC W-SU
Atlantic/ EST5EDT HST Mideast/ PST8PDT zone.tab
Australia/ Etc/ Iceland MST right/ Zulu
Brazil/ Europe/ Indian/ MST7MDT ROC
Canada/ Factory Iran Navajo ROK
CET GB iso3166.tab NZ Singapore
Chile/ GB-Eire Israel NZ-CHAT Turkey
CST6CDT GMT Jamaica Pacific/ UCT

[root@ip-kapilk-pc kapil]# ln -sf /usr/share/zoneinfo/EST /etc/localtime
[root@ip-kapilk-pc kapil]# date
Fri Jan 22 08:40:32 EST 2010
[root@ip-kapilk-pc kapil]#

Change TimeZone Using /etc/localtime File

For this example, assume that your current timezone is UTC as shown below. You would like to change this to Pacific Time.

# date
Mon Sep 17 22:59:24 UTC 2010

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.