时间"/>
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设置系统时间
发布评论