Time-Zone In CentOS 7 CLI

INGREDIENTS

1. Centos-7(Minimal Installed)
2. Internet


PROCESSING

You can check your current time zone with the following command:

[root@localhost /]# ls –l /etc/localtime

/etc/localtime  is a symlink to the file localtime or to the correct timezone file in the system located in /usr/share/zoneinfo/ directory. This directory contains the files as per timezone name. Ex:
/usr/share/zonetime/Asia/Kolkata

To see the timezone of your country use the following command:

[root@localhost /]# timedatectl list-timezones | grep Asia | less

Here you can see your nearest or your country timezone…..

To change it use the following command:

[root@localhost /]#timedatectl set-timezone time_zone(Ex;Asia/Kolkata)


Now you can see the change by using date or hwclock command or use the first command of this article

No comments:

Post a Comment