kali设置系统时间

编程入门 行业动态 更新时间:2024-10-09 13:30:49

kali设置系统<a href=https://www.elefans.com/category/jswz/34/1771441.html style=时间"/>

kali设置系统时间

kali设置系统时间

1、查看系统时间,发现时间不对

┌──(root㉿kali)-[~]
└─# date
2022年 05月 29日 星期日 23:08:47 EDT

2、修改系统时间

步骤:
tzselect
# 依次选择 Asia - China - Beijing Time - Yes
echo "ZONE=Asia/Shanghai" >> /etc/sysconfig
rm -f /etc/localtime     # 链接到上海时区文件       
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

具体如下:

┌──(root㉿kali)-[~]
└─# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa                                                            5) Atlantic Ocean                                                   9) Pacific Ocean
2) Americas                                                          6) Australia                                                       10) coord - I want to use geographical coordinates.
3) Antarctica                                                        7) Europe                                                          11) TZ - I want to specify the timezone using the Posix TZ format.
4) Asia                                                              8) Indian Ocean
#? 4
Please select a country whose clocks agree with yours.
1) Afghanistan             7) Bhutan                13) Georgia               19) Israel                25) Kuwait                31) Mongolia              37) Philippines           43) Syria                 49) Uzbekistan
2) Antarctica              8) Brunei                14) Hong Kong             20) Japan                 26) Kyrgyzstan            32) Myanmar (Burma)       38) Qatar                 44) Taiwan                50) Vietnam
3) Armenia                 9) Cambodia              15) India                 21) Jordan                27) Laos                  33) Nepal                 39) Russia                45) Tajikistan            51) Yemen
4) Azerbaijan             10) China                 16) Indonesia             22) Kazakhstan            28) Lebanon               34) Oman                  40) Saudi Arabia          46) Thailand
5) Bahrain                11) Cyprus                17) Iran                  23) Korea (North)         29) Macau                 35) Pakistan              41) Singapore             47) Turkmenistan
6) Bangladesh             12) East Timor            18) Iraq                  24) Korea (South)         30) Malaysia              36) Palestine             42) Sri Lanka             48) United Arab Emirates
#? 10
Please select one of the following timezones.
1) Beijing Time
2) Xinjiang Time
#? 1The following information has been given:ChinaBeijing TimeTherefore TZ='Asia/Shanghai' will be used.
Selected time is now:   Mon May 30 11:10:18 CST 2022.
Universal Time is now:  Mon May 30 03:10:18 UTC 2022.
Is the above information OK?
1) Yes
2) No
#? 1You can make this change permanent for yourself by appending the lineTZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Shanghai┌──(root㉿kali)-[~]
└─# echo "ZONE=Asia/Shanghai" >> /etc/sysconfig
rm -f /etc/localtime     # 链接到上海时区文件       
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime┌──(root㉿kali)-[~]
└─# date
2022年 05月 30日 星期一 11:10:53 CST┌──(root㉿kali)-[~]
└─# 

更多推荐

kali设置系统时间

本文发布于:2024-02-06 18:04:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1750959.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:时间   系统   kali

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!