baoguoxiao@bogon:~/windows/lumen$ 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 2) Americas 3) Antarctica 4) Asia 5) Atlantic Ocean 6) Australia 7) Europe 8) Indian Ocean 9) Pacific Ocean 10) coord - I want to use geographical coordinates. 11) TZ - I want to specify the time zone using the Posix TZ format. #? 4 Please select a country whose clocks agree with yours. 1) Afghanistan 18) Israel 35) Palestine 2) Armenia 19) Japan 36) Philippines 3) Azerbaijan 20) Jordan 37) Qatar 4) Bahrain 21) Kazakhstan 38) Russia 5) Bangladesh 22) Korea (North) 39) Saudi Arabia 6) Bhutan 23) Korea (South) 40) Singapore 7) Brunei 24) Kuwait 41) Sri Lanka 8) Cambodia 25) Kyrgyzstan 42) Syria 9) China 26) Laos 43) Taiwan 10) Cyprus 27) Lebanon 44) Tajikistan 11) East Timor 28) Macau 45) Thailand 12) Georgia 29) Malaysia 46) Turkmenistan 13) Hong Kong 30) Mongolia 47) United Arab Emirates 14) India 31) Myanmar (Burma) 48) Uzbekistan 15) Indonesia 32) Nepal 49) Vietnam 16) Iran 33) Oman 50) Yemen 17) Iraq 34) Pakistan #? 9 Please select one of the following time zone regions. 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: Thu May 17 14:25:45 CST 2018. Universal Time is now: Thu May 17 06:25:45 UTC 2018. 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
$ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE friendlyhello latest bc24eaee5b6d 10 minutes ago 148MB python 2.7-slim 4fd30fc83117 8 weeks ago 138MB hello-world latest f2a91732366c 2 months ago 1.85kB
$ docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 27d94a4c5481 friendlyhello "python app.py" 7 minutes ago Up 7 minutes 0.0.0.0:4000->80/tcp vigilant_easley
Hello from Docker! This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID: https://cloud.docker.com/
For more examples and ideas, visit: https://docs.docker.com/engine/userguide/
列出已经下载到你的机器中的hello-world镜像:
1 2 3
$ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest f2a91732366c 2 months ago 1.85kB
$ docker container ls --all CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 65fbaf599670 hello-world "/hello" 23 minutes ago Exited (0) 23 minutes ago silly_mclean 419dce2f6ec9 hello-world "/hello" 2 hours ago Exited (0) 2 hours ago eloquent_visvesvaraya
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied
# deb cdrom:[Ubuntu-Server 17.10 _Artful Aardvark_ - Release amd64 (20171017.1)]/ artful main restricted
修改源为阿里源
这是我从阿里云的帮助文件中复制到的源的内容。
1 2 3 4 5 6 7 8 9 10
deb http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse
首先我们需要对该内容进行修改。
我们查看版本信息:
1 2 3 4 5 6
baoguoxiao@ubuntu:~$ sudo lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 17.10 Release: 17.10 Codename: artful
可以看到codename的值是artful
我们可以把上面quantal全部替换为artful,替换完成如下:
1 2 3 4 5 6 7 8 9 10
deb http://mirrors.aliyun.com/ubuntu/ artful main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ artful-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ artful-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ artful main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ artful-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ artful-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse
然后将替换好的内容添加到**/etc/apt/sources.list**开头。
这样就可以**:x**进行保存了。
更新包
其实很简单。首先更新源:
1
sudo apt update
在输出的消息的最后一行会输出以下内容:
1
46 packages can be upgraded. Run 'apt list --upgradable' to see them.