Ubuntu1804安装Git

以管理员方式运行

  1. sudo add-apt-repository ppa:git-core/ppa
  2. sudo apt update; apt install git
  3. git --version # 查看版本

双系统修改默认启动项

  1. sudo chmod +x /etc/default/grub
  2. sudo gedit /etc/default/grub

图片.png

安装Docker

  1. # 卸载旧版本
  2. sudo apt-get remove docker docker-engine docker.io containerd runc
  3. sudo apt-get update
  4. sudo apt-get install \
  5. apt-transport-https \
  6. ca-certificates \
  7. curl \
  8. gnupg \
  9. lsb-release
  10. # 添加秘钥
  11. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  12. echo \
  13. "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  14. $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  15. sudo apt-get update
  16. # 安装最新版本
  17. sudo apt-get install docker-ce docker-ce-cli containerd.io
  18. # 安装指定版本
  19. sudo apt-get install docker-ce=5:20.10.7~3-0~ubuntu-bionic docker-ce-cli=5:20.10.7~3-0~ubuntu-bionic containerd.io
  20. sudo docker run hello-world

预期输出结果

  1. Unable to find image 'hello-world:latest' locally
  2. latest: Pulling from library/hello-world
  3. b8dfde127a29: Pull complete
  4. Digest: sha256:df5f5184104426b65967e016ff2ac0bfcd44ad7899ca3bbcf8e44e4461491a9e
  5. Status: Downloaded newer image for hello-world:latest
  6. Hello from Docker!
  7. This message shows that your installation appears to be working correctly.
  8. To generate this message, Docker took the following steps:
  9. 1. The Docker client contacted the Docker daemon.
  10. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
  11. (amd64)
  12. 3. The Docker daemon created a new container from that image which runs the
  13. executable that produces the output you are currently reading.
  14. 4. The Docker daemon streamed that output to the Docker client, which sent it
  15. to your terminal.
  16. To try something more ambitious, you can run an Ubuntu container with:
  17. $ docker run -it ubuntu bash
  18. Share images, automate workflows, and more with a free Docker ID:
  19. https://hub.docker.com/
  20. For more examples and ideas, visit:
  21. https://docs.docker.com/get-started/

卸载Docker

  1. sudo apt-get purge docker-ce docker-ce-cli containerd.io
  2. sudo rm -rf /var/lib/docker
  3. sudo rm -rf /var/lib/containerd

MinGW64位下载地址

  1. https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/

更换清华源

  1. ### 终端命令
  2. vi /etc/apt/sources.list
  3. ### 源信息
  4. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
  5. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  6. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  7. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  8. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
  9. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
  10. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  11. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  12. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  13. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
  14. ###终端命令
  15. sudo apt update
  16. sudo apt full-upgrade

更改服务器时间

  1. ### 查看当前时间
  2. date -R
  3. ### 开始选择时区(大州/国家/城市)
  4. tzselect
  5. ### 预期的第一次选项
  6. 1) Africa
  7. 2) Americas
  8. 3) Antarctica
  9. 4) Asia
  10. 5) Atlantic Ocean
  11. 6) Australia
  12. 7) Europe
  13. 8) Indian Ocean
  14. 9) Pacific Ocean
  15. ### 预期的第二次选项
  16. 1) Afghanistan 18) Israel 35) Palestine
  17. 2) Armenia 19) Japan 36) Philippines
  18. 3) Azerbaijan 20) Jordan 37) Qatar
  19. 4) Bahrain 21) Kazakhstan 38) Russia
  20. 5) Bangladesh 22) Korea (North) 39) Saudi Arabia
  21. 6) Bhutan 23) Korea (South) 40) Singapore
  22. 7) Brunei 24) Kuwait 41) Sri Lanka
  23. 8) Cambodia 25) Kyrgyzstan 42) Syria
  24. 9) China 26) Laos 43) Taiwan
  25. 10) Cyprus 27) Lebanon 44) Tajikistan
  26. 11) East Timor 28) Macau 45) Thailand
  27. 12) Georgia 29) Malaysia 46) Turkmenistan
  28. 13) Hong Kong 30) Mongolia 47) United Arab Emirates
  29. 14) India 31) Myanmar (Burma) 48) Uzbekistan
  30. 15) Indonesia 32) Nepal 49) Vietnam
  31. 16) Iran 33) Oman 50) Yemen
  32. 17) Iraq 34) Pakistan
  33. ### 预期的第三次选项
  34. 1) Beijing Time
  35. 2) Xinjiang Time
  36. ### 最后一次选择
  37. Is the above information OK?
  38. 1) Yes
  39. 2) No
  40. ### 复制时区文件
  41. sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime