ubuntu@RaspberryPi:~$ sudo vim /etc/apt/sources.list
在文件内注释掉默认的软件源,在文件末尾追加中科大的软件源。(注意 Ubuntu 版本,Ubuntu Server 20.04.1 LTS 是 focal)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
中国科学技术大学 https://mirrors.ustc.edu.cn 默认注释了源码仓库,如有需要可自行取消注释 deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal main main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
预发布软件源,不建议启用 deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse
ubuntu@RaspberryPi:~$ sudo tzselect Please identify a location so that time zone rules can be set correctly. Please select a continent, ocean, "coord", or "TZ". 1) Africa 7) Europe 2) Americas 8) Indian Ocean 3) Antarctica 9) Pacific Ocean 4) Asia 10) coord - I want to use geographical coordinates. 5) Atlantic Ocean 11) TZ - I want to specify the timezone using the Posix TZ format. 6) Australia ? 4 Please select a country whose clocks agree with yours. 1) Afghanistan 10) Cyprus 19) Japan 28) Macau 37) Qatar 46) Turkmenistan 2) Armenia 11) East Timor 20) Jordan 29) Malaysia 38) Russia 47) United Arab Emirates 3) Azerbaijan 12) Georgia 21) Kazakhstan 30) Mongolia 39) Saudi Arabia 48) Uzbekistan 4) Bahrain 13) Hong Kong 22) Korea (North) 31) Myanmar (Burma) 40) Singapore 49) Vietnam 5) Bangladesh 14) India 23) Korea (South) 32) Nepal 41) Sri Lanka 50) Yemen 6) Bhutan 15) Indonesia 24) Kuwait 33) Oman 42) Syria 7) Brunei 16) Iran 25) Kyrgyzstan 34) Pakistan 43) Taiwan 8) Cambodia 17) Iraq 26) Laos 35) Palestine 44) Tajikistan 9) China 18) Israel 27) Lebanon 36) Philippines 45) Thailand ? 9 Please select one of the following timezones. 1) Beijing Time 2) Xinjiang Time ? 1
The following information has been given:
China Beijing Time
Therefore TZ='Asia/Shanghai' will be used. Selected time is now: Sun Dec 20 16:20:00 CST 2020. Universal Time is now: Sun Dec 20 08:20:00 UTC 2020. Is the above information OK? 1) Yes 2) No ? 1
You can make this change permanent for yourself by appending the line TZ='Asia/Shanghai'; export TZ to the file '.profile'in your home directory; thenlog out and login again.
Here is that TZ value again, this time on standard output so that you can use the /usr/bin/tzselect commandin shell scripts: Asia/Shanghai