![]() ![]() Date command can print, or set date and time of your linux system. To check or show the current date, and time of your Linux system, you can use date command. Linux system normally keep their timezone in /etc/localtime. There are a few different way to change date, time, and timezone on centos 6 via the command line terminal. This article will properly work with other Linux distributions like Ubuntu, Linux Mint, Fedora or Redhat since the way Linux date, time, and timezone work all the same in Linux server. I will show you how to change date and time on centos 6 operating system in this article. It would be easier for me to manage my server if it has the same time and date. It’s hard to read logs with different time zone from your server, so I decided to change the timezone of my server to the my current timezone. ![]() Run the following commands to change your current timezone to new timezone ~]# mv /etc/localtime /root/localtime.When I was tweaking one of my linux server, I found out that the time of my server isn’t match with my local time. 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 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 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 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |