1. 程式人生 > >一鍵切換指令碼

一鍵切換指令碼

1.一鍵切換指令碼

第一步:cd ~

[email protected]:~$ cd ~

第二步:mkdir -p aliyun 163

[email protected]:~$ mkdir -p aliyun 163

第三步:在aliyun 163目錄下vim source.list並複製相應的yum源

[email protected]:~$ cd aliyuan
[email protected]:~/aliyuan$ vim source.list
[email protected]:~/aliyuan$ cd ..
[email protected]
:~$ cd 163 [email protected]:~/163$ vim source.list

第四步:sudo vim check_yum.sh 寫入內容

[email protected]:~/163$ cd ..
[email protected]:~$ sudo vim check_yum.sh
[sudo] hgy 的密碼: 

第五步:sudo apt-get update

[email protected]:~$ sudo apt-get update
命中:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
獲取:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
獲取:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]      
獲取:4 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]                
獲取:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [67.7 kB]
獲取:6 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [842 kB]               
獲取:7 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [68.0 kB]             
獲取:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [107 kB]       
獲取:9 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [142 kB]          
獲取:10 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [759 kB]                 
獲取:11 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [320 kB]         
獲取:12 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [227 kB]            
獲取:13 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [682 kB]            
獲取:14 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [624 kB]             
獲取:15 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [247 kB]     
獲取:16 http://cn.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [337 kB]        
獲取:17 http://cn.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5,960 B]  
獲取:18 http://cn.archive.ubuntu.com/ubuntu xenial-updates/multiverse DEP-11 64x64 Icons [14.3 kB]     
獲取:19 http://cn.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3,328 B]      
獲取:20 http://cn.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [5,100 B]  
已下載 4,774 kB,耗時 17秒 (269 kB/s)                                                                  
AppStream cache update completed, but some metadata was ignored due to errors.
正在讀取軟體包列表... 完成

第六步:sudo apt-get upgrade

[email protected]:~$ sudo apt-get upgrade
正在讀取軟體包列表... 完成
正在分析軟體包的依賴關係樹       
正在讀取狀態資訊... 完成       
正在計算更新... 完成
下列軟體包將被升級:
  fonts-opensymbol fwupd libappstream-glib8 libdfu1 libfwupd1 libglib2.0-0 libglib2.0-bin
  libglib2.0-data libnux-4.0-0 libnux-4.0-common libreoffice-avmedia-backend-gstreamer
  libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
  libreoffice-gnome libreoffice-gtk libreoffice-impress libreoffice-math libreoffice-ogltrans
  libreoffice-pdfimport libreoffice-style-breeze libreoffice-style-galaxy libreoffice-writer
  libsmbclient libwbclient0 nux-tools python3-uno python3-urllib3 samba-libs squashfs-tools uno-libs3
  ure x11-common xorg xserver-common
升級了 37 個軟體包,新安裝了 0 個軟體包,要解除安裝 0 個軟體包,有 0 個軟體包未被升級。
需要下載 81.9 MB 的歸檔。
解壓縮後會消耗 5,120 B 的額外空間。
您希望繼續執行嗎? [Y/n] y
獲取:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-data all 2.48.2-0ubuntu4 [132 kB]
獲取:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-bin amd64 2.48.2-0ubuntu4 [39.4 kB]
獲取:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-0 amd64 2.48.2-0ubuntu4 [1,119 kB]
獲取:4 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-ogltrans amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [73.3 kB]
獲取:5 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ure amd64 5.1.6~rc2-0ubuntu1~xenial4 [1,532 kB]
獲取:6 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 uno-libs3 amd64 5.1.6~rc2-0ubuntu1~xenial4 [704 kB]
獲取:7 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-calc amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [6,463 kB]
獲取:8 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-impress amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [969 kB]
獲取:9 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-draw amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [2,410 kB]
獲取:10 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-gnome amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [60.7 kB]
獲取:11 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-gtk amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [207 kB]
獲取:12 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-uno amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [137 kB]
獲取:13 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-style-galaxy all 1:5.1.6~rc2-0ubuntu1~xenial4 [1,523 kB]
獲取:14 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-style-breeze all 1:5.1.6~rc2-0ubuntu1~xenial4 [470 kB]
獲取:15 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-common all 1:5.1.6~rc2-0ubuntu1~xenial4 [22.4 MB]
獲取:16 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-pdfimport amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [182 kB]
獲取:17 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-math amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [374 kB]
獲取:18 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-base-core amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [714 kB]
獲取:19 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-avmedia-backend-gstreamer amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [24.3 kB]
獲取:20 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-writer amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [7,581 kB]
獲取:21 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libreoffice-core amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [28.2 MB]
獲取:22 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 fonts-opensymbol all 2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial4 [104 kB]
獲取:23 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 samba-libs amd64 2:4.3.11+dfsg-0ubuntu0.16.04.16 [5,161 kB]
獲取:24 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libwbclient0 amd64 2:4.3.11+dfsg-0ubuntu0.16.04.16 [30.2 kB]
獲取:25 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsmbclient amd64 2:4.3.11+dfsg-0ubuntu0.16.04.16 [53.5 kB]
獲取:26 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libappstream-glib8 amd64 0.5.13-1ubuntu6 [101 kB]
獲取:27 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdfu1 amd64 0.8.3-0ubuntu4 [48.3 kB]
獲取:28 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libfwupd1 amd64 0.8.3-0ubuntu4 [32.8 kB]
獲取:29 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 fwupd amd64 0.8.3-0ubuntu4 [120 kB]
獲取:30 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libnux-4.0-0 amd64 4.0.8+16.04.20180622.2-0ubuntu1 [698 kB]
獲取:31 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libnux-4.0-common all 4.0.8+16.04.20180622.2-0ubuntu1 [41.9 kB]
獲取:32 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 nux-tools amd64 4.0.8+16.04.20180622.2-0ubuntu1 [10.2 kB]
獲取:33 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-urllib3 all 1.13.1-2ubuntu0.16.04.2 [58.1 kB]
獲取:34 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 squashfs-tools amd64 1:4.3-3ubuntu2.16.04.3 [105 kB]
獲取:35 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 x11-common all 1:7.7+13ubuntu3.1 [22.9 kB]
獲取:36 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 xorg amd64 1:7.7+13ubuntu3.1 [2,978 B]
獲取:37 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 xserver-common all 2:1.18.4-0ubuntu0.8 [27.7 kB]
已下載 81.9 MB,耗時 2分 23秒 (570 kB/s)                                                               
正在從軟體包中解出模板:100%
(正在讀取資料庫 ... 系統當前共安裝有 223967 個檔案和目錄。)
正準備解包 .../libglib2.0-data_2.48.2-0ubuntu4_all.deb  ...
正在將 libglib2.0-data (2.48.2-0ubuntu4) 解包到 (2.48.2-0ubuntu3) 上 ...
正準備解包 .../libglib2.0-bin_2.48.2-0ubuntu4_amd64.deb  ...
正在將 libglib2.0-bin (2.48.2-0ubuntu4) 解包到 (2.48.2-0ubuntu3) 上 ...
正準備解包 .../libglib2.0-0_2.48.2-0ubuntu4_amd64.deb  ...
正在將 libglib2.0-0:amd64 (2.48.2-0ubuntu4) 解包到 (2.48.2-0ubuntu3) 上 ...
正準備解包 .../libreoffice-ogltrans_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-ogltrans (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../ure_5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 ure (5.1.6~rc2-0ubuntu1~xenial4) 解包到 (5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../uno-libs3_5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 uno-libs3 (5.1.6~rc2-0ubuntu1~xenial4) 解包到 (5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-calc_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-calc (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-impress_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-impress (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-draw_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-draw (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-gnome_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-gnome (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-gtk_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-gtk (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../python3-uno_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 python3-uno (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-style-galaxy_1%3a5.1.6~rc2-0ubuntu1~xenial4_all.deb  ...
正在將 libreoffice-style-galaxy (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-style-breeze_1%3a5.1.6~rc2-0ubuntu1~xenial4_all.deb  ...
正在將 libreoffice-style-breeze (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-common_1%3a5.1.6~rc2-0ubuntu1~xenial4_all.deb  ...
正在將 libreoffice-common (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-pdfimport_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-pdfimport (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-math_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-math (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-base-core_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-base-core (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-avmedia-backend-gstreamer_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-avmedia-backend-gstreamer (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-writer_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-writer (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../libreoffice-core_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb  ...
正在將 libreoffice-core (1:5.1.6~rc2-0ubuntu1~xenial4) 解包到 (1:5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../fonts-opensymbol_2%3a102.7+LibO5.1.6~rc2-0ubuntu1~xenial4_all.deb  ...
正在將 fonts-opensymbol (2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial4) 解包到 (2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial3) 上 ...
正準備解包 .../samba-libs_2%3a4.3.11+dfsg-0ubuntu0.16.04.16_amd64.deb  ...
正在將 samba-libs:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.16) 解包到 (2:4.3.11+dfsg-0ubuntu0.16.04.15) 上 ...
正準備解包 .../libwbclient0_2%3a4.3.11+dfsg-0ubuntu0.16.04.16_amd64.deb  ...
正在將 libwbclient0:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.16) 解包到 (2:4.3.11+dfsg-0ubuntu0.16.04.15) 上 ...
正準備解包 .../libsmbclient_2%3a4.3.11+dfsg-0ubuntu0.16.04.16_amd64.deb  ...
正在將 libsmbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.16) 解包到 (2:4.3.11+dfsg-0ubuntu0.16.04.15) 上 ...
正準備解包 .../libappstream-glib8_0.5.13-1ubuntu6_amd64.deb  ...
正在將 libappstream-glib8:amd64 (0.5.13-1ubuntu6) 解包到 (0.5.13-1ubuntu5) 上 ...
正準備解包 .../libdfu1_0.8.3-0ubuntu4_amd64.deb  ...
正在將 libdfu1:amd64 (0.8.3-0ubuntu4) 解包到 (0.8.3-0ubuntu3) 上 ...
正準備解包 .../libfwupd1_0.8.3-0ubuntu4_amd64.deb  ...
正在將 libfwupd1:amd64 (0.8.3-0ubuntu4) 解包到 (0.8.3-0ubuntu3) 上 ...
正準備解包 .../fwupd_0.8.3-0ubuntu4_amd64.deb  ...
正在將 fwupd (0.8.3-0ubuntu4) 解包到 (0.8.3-0ubuntu3) 上 ...
正準備解包 .../libnux-4.0-0_4.0.8+16.04.20180622.2-0ubuntu1_amd64.deb  ...
正在將 libnux-4.0-0 (4.0.8+16.04.20180622.2-0ubuntu1) 解包到 (4.0.8+16.04.20170816-0ubuntu1) 上 ...
正準備解包 .../libnux-4.0-common_4.0.8+16.04.20180622.2-0ubuntu1_all.deb  ...
正在將 libnux-4.0-common (4.0.8+16.04.20180622.2-0ubuntu1) 解包到 (4.0.8+16.04.20170816-0ubuntu1) 上 ...
正準備解包 .../nux-tools_4.0.8+16.04.20180622.2-0ubuntu1_amd64.deb  ...
正在將 nux-tools (4.0.8+16.04.20180622.2-0ubuntu1) 解包到 (4.0.8+16.04.20170816-0ubuntu1) 上 ...
正準備解包 .../python3-urllib3_1.13.1-2ubuntu0.16.04.2_all.deb  ...
正在將 python3-urllib3 (1.13.1-2ubuntu0.16.04.2) 解包到 (1.13.1-2ubuntu0.16.04.1) 上 ...
正準備解包 .../squashfs-tools_1%3a4.3-3ubuntu2.16.04.3_amd64.deb  ...
正在將 squashfs-tools (1:4.3-3ubuntu2.16.04.3) 解包到 (1:4.3-3ubuntu2.16.04.2) 上 ...
正準備解包 .../x11-common_1%3a7.7+13ubuntu3.1_all.deb  ...
正在將 x11-common (1:7.7+13ubuntu3.1) 解包到 (1:7.7+13ubuntu3) 上 ...
正準備解包 .../xorg_1%3a7.7+13ubuntu3.1_amd64.deb  ...
正在將 xorg (1:7.7+13ubuntu3.1) 解包到 (1:7.7+13ubuntu3) 上 ...
正準備解包 .../xserver-common_2%3a1.18.4-0ubuntu0.8_all.deb  ...
正在將 xserver-common (2:1.18.4-0ubuntu0.8) 解包到 (2:1.18.4-0ubuntu0.7) 上 ...
正在處理用於 man-db (2.7.5-1) 的觸發器 ...
正在處理用於 libc-bin (2.23-0ubuntu10) 的觸發器 ...
正在處理用於 mime-support (3.59ubuntu1) 的觸發器 ...
正在處理用於 gnome-menus (3.13.3-6ubuntu3.1) 的觸發器 ...
正在處理用於 hicolor-icon-theme (0.15-0ubuntu1.1) 的觸發器 ...
正在處理用於 fontconfig (2.11.94-0ubuntu1.1) 的觸發器 ...
正在處理用於 dbus (1.10.6-1ubuntu3.3) 的觸發器 ...
正在處理用於 systemd (229-4ubuntu21.4) 的觸發器 ...
正在處理用於 ureadahead (0.100.0-19) 的觸發器 ...
正在設定 libglib2.0-data (2.48.2-0ubuntu4) ...
正在設定 libglib2.0-0:amd64 (2.48.2-0ubuntu4) ...
正在設定 libglib2.0-bin (2.48.2-0ubuntu4) ...
正在設定 uno-libs3 (5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 ure (5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 fonts-opensymbol (2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libwbclient0:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.16) ...
正在設定 samba-libs:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.16) ...
正在設定 libsmbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.16) ...
正在設定 libappstream-glib8:amd64 (0.5.13-1ubuntu6) ...
正在設定 libdfu1:amd64 (0.8.3-0ubuntu4) ...
正在設定 libfwupd1:amd64 (0.8.3-0ubuntu4) ...
正在設定 fwupd (0.8.3-0ubuntu4) ...
正在設定 libnux-4.0-common (4.0.8+16.04.20180622.2-0ubuntu1) ...
正在設定 libnux-4.0-0 (4.0.8+16.04.20180622.2-0ubuntu1) ...
正在設定 nux-tools (4.0.8+16.04.20180622.2-0ubuntu1) ...
正在安裝新版本配置檔案 /etc/X11/Xsession.d/50_check_unity_support ...
正在設定 python3-urllib3 (1.13.1-2ubuntu0.16.04.2) ...
正在設定 squashfs-tools (1:4.3-3ubuntu2.16.04.3) ...
正在設定 x11-common (1:7.7+13ubuntu3.1) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
正在設定 xorg (1:7.7+13ubuntu3.1) ...
正在設定 xserver-common (2:1.18.4-0ubuntu0.8) ...
正在設定 libreoffice-common (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在安裝新版本配置檔案 /etc/bash_completion.d/libreoffice.sh ...
正在設定 libreoffice-style-galaxy (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-style-breeze (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-core (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-draw (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-impress (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-ogltrans (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-base-core (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-calc (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-gtk (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-gnome (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 python3-uno (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-pdfimport (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-math (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-avmedia-backend-gstreamer (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在設定 libreoffice-writer (1:5.1.6~rc2-0ubuntu1~xenial4) ...
正在處理用於 desktop-file-utils (0.22-1ubuntu5.2) 的觸發器 ...
正在處理用於 bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) 的觸發器 ...
Rebuilding /usr/share/applications/bamf-2.index...
正在處理用於 shared-mime-info (1.5-2ubuntu0.2) 的觸發器 ...
正在處理用於 libc-bin (2.23-0ubuntu10) 的觸發器 ...

第七步:sudo chmod +x check_yum.sh

[email protected]:~$ sudo chmod +x  check_yum.sh

 

2.check_yum.sh

#!/bin/bash 
​
rm -rf /etc/apt/source.list
​
read -p "請選擇阿里雲yum源或者163yum源(阿里雲1:163 2):" yums   #yums用來接收 1 或者2 
​
if [ $yums -eq 1 ]
then 
    echo '您選擇了阿里雲'
    cp ~/aliyun/source.list /etc/apt 
else
    echo '您選擇了163'
    cp ~/163/source.list /etc/apt
fi 
​
sudo apt-get update
sudo apt-get upgrade 
​
sudo chmod +x  check_yum.sh  

  

3.yum源

搜狐源

deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
​
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
​
​
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
​
​
deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
​
​
​
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
​
​
deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
​
​
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
​
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
​
deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
​
​
deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse

  

網易源

deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
​
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
​
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
​
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
​
​
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
​
​
​
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
​
​
​
​
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
​
​
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
​
​
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
​
​
​
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

  

阿里雲源

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
​
​
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
​
​
​
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
​
​
​
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
​
​
​
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
​
​
​
deb http://archive.canonical.com/ubuntu xenial partner
​
​
​
deb-src http://archive.canonical.com/ubuntu xenial partner
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
​
​
​
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
​
​
​
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse