solutionbad.blogg.se

How to change timezone linux centos
How to change timezone linux centos













Hh is hour, mm is minite and ss is second.įor example, we can set the time to 11:28 by: # date +%T -s "11:28:00" Set Linux date and time Linux time can be set using following syntax: # date +%T -s "hh:mm:ss" Thanks for reading this article.# date +%Y%m%d -s "20100622" Set Linux time So that’s how you set timezone on CentOS using the command line interface and graphically. You won’t have to reboot the system manually as you can see in the screenshot below. Unlike the command line approach, this will update the date & time of your CentOS machine instantly. Once you’re happy, click on the x button as marked in the screenshot below. Search and select your timezone from here. You can also click on Time Zone to change your timezone manually.Ī map should appear. Now from the Settings app, click on Date & Time as marked in the screenshot below.įrom here, you can toggle the Automatic Time Zone switch and your timezone should be automatically set.

how to change timezone linux centos

If you have any desktop environment such as GNOME or KDE installed on your CentOS machine, then you can easily set timezone using graphical softwares.įirst open Settings app from Application Menu > System Tools > Settings Set Timezone using Graphical User Interface: Now run the following command to append line as marked line in the previous screenshot to ~/.profile file:

how to change timezone linux centos

I am going to show you how to do that now. All you have to do is copy the marked line and append it in the ~/.profile file. Now tzselect should tell you how to set the timezone. If you think everything is alright, the press 1 and then press. As you can see, the timezone is Pacific/Honolulu. The timezone information should be displayed. I am typing in 29 which is Hawaii’s timezone for the demonstration. Now type in any of the numbers from the list and press to select any of the timezone regions from the list.

how to change timezone linux centos

I am going for United States for this demonstration. Now type in any of the numbers and press select your country.

how to change timezone linux centos

I am going for Americas for this demonstration. Now type in any number between 1 and 11 and press to select your continent or ocean.















How to change timezone linux centos