文章页正文上
这篇文章主要讲解了“linux修改时区不生效如何解决”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“linux修改时区不生效如何解决”吧! linux修改时区不生效的解决办法:1、登录linux系统,进入终端;2、拷贝配置文件来修改时区;3、通过“hwclock –show”命令查看硬件时钟,然后设置设置硬件时钟;4、通过“vim /etc/timezone Asia/Shanghai”修改时区即可。一、选择时区
#tzselect Pleaseidentifyalocationsothattimezonerulescanbesetcorrectly. Pleaseselectacontinentorocean. 1)Africa 2)Americas 3)Antarctica 4)ArcticOcean 5)Asia 6)AtlanticOcean 7)Australia 8)Europe 9)IndianOcean 10)PacificOcean 11)none-IwanttospecifythetimezoneusingthePosixTZformat. #?5 Pleaseselectacountry. 1)Afghanistan18)Israel35)Palestine 2)Armenia19)Japan36)Philippines 3)Azerbaijan20)Jordan37)Qatar 4)Bahrain21)Kazakhstan38)Russia 5)Bangladesh22)Korea(North)39)SaudiArabia 6)Bhutan23)Korea(South)40)Singapore 7)Brunei24)Kuwait41)SriLanka 8)Cambodia25)Kyrgyzstan42)Syria 9)China26)Laos43)Taiwan 10)Cyprus27)Lebanon44)Tajikistan 11)EastTimor28)Macau45)Thailand 12)Georgia29)Malaysia46)Turkmenistan 13)HongKong30)Mongolia47)UnitedArabEmirates 14)India31)Myanmar(Burma)48)Uzbekistan 15)Indonesia32)Nepal49)Vietnam 16)Iran33)Oman50)Yemen 17)Iraq34)Pakistan #?9 Pleaseselectoneofthefollowingtimezoneregions. 1)BeijingTime 2)XinjiangTime #?1 Thefollowinginformationhasbeengiven: China BeijingTime ThereforeTZ='Asia/Shanghai'willbeused. Localtimeisnow:FriJan416:02:54CST2019. UniversalTimeisnow:FriJan408:02:54UTC2019. IstheaboveinformationOK? 1)Yes 2)No #?1 Youcanmakethischangepermanentforyourselfbyappendingtheline TZ='Asia/Shanghai';exportTZ tothefile'.profile'inyourhomedirectory;thenlogoutandloginagain. HereisthatTZvalueagain,thistimeonstandardoutputsothatyou canusethe/usr/bin/tzselectcommandinshellscripts: Asia/Shanghai
二、拷贝配置文件来修改时区
rm-f/etc/localtime ln-sf/usr/share/zoneinfo/Asia/Shanghai/etc/localtime
三、查看硬件时钟
hwclock--show
四、设置硬件时钟
hwclock--set--date="10/22/1822:00"
五、同步系统硬免费云主机、域名件时钟
hwclock--hctosys
六、修改时区文件
vim/etc/timezone Asia/Shanghai
七、查看时间
#timedatectl Localtime:五2019-01-0415:57:15CET Universaltime:五2019-01-0414:57:15UTC RTCtime:五2019-01-0415:57:15 Timezone:Asia/Shanghai(CET,+0100) NTPenabled:yes NTPsynchronized:no RTCinlocalTZ:yes DSTactive:no LastDSTchange:DSTendedat 日2018-10-2802:59:59CEST 日2018-10-2802:00:00CET NextDSTchange:DSTbegins(theclockjumpsonehourforward)at 日2019-03-3101:59:59CET 日2019-03-3103:00:00CEST Warning:ThesystemisconfiguredtoreadtheRTCtimeinthelocaltimezone. Thismodecannotbefullysupported.Itwillcreatevariousproblems withtimezonechangesanddaylightsavingtimeadjustments.TheRTC timeisneverupdated,itreliesonexternalfacilitiestomaintainit. Ifatallpossible,useRTCinUTCbycalling 'timedatectlset-local-rtc0'.
感谢各位的阅读,以上就是“linux修改时区不生效如何解决”的内容了,经过本文的学习后,相信大家对linux修改时区不生效如何解决这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是云技术,小编将为大家推送更多相关知识点的文章,欢迎关注!
这篇文章主要介绍“macbookairm1如何截图”,在日常操作中,相信很多人在macbookairm1如何截图问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法免费云主机、域名,希望对大家解答”macbookairm1如何截图”的疑惑有所帮助!接下…
文章页内容下