一键切换脚本

1.一键切换脚本

第一步:cd ~

hgy@hgy-virtual-machine:~$ cd ~

第二步:mkdir -p aliyun 163

hgy@hgy-virtual-machine:~$ mkdir -p aliyun 163

第三步:在aliyun 163目录下vim source.list并复制相应的yum源

hgy@hgy-virtual-machine:~$ cd aliyuan
hgy@hgy-virtual-machine:~/aliyuan$ vim source.list
hgy@hgy-virtual-machine:~/aliyuan$ cd ..
hgy@hgy-virtual-machine:~$ cd 163
hgy@hgy-virtual-machine:~/163$ vim source.list

第四步:sudo vim check_yum.sh 写入内容

hgy@hgy-virtual-machine:~/163$ cd ..
hgy@hgy-virtual-machine:~$ sudo vim check_yum.sh
[sudo] hgy 的密码: 

第五步:sudo apt-get update

hgy@hgy-virtual-machine:~$ 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

hgy@hgy-virtual-machine:~$ 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

hgy@hgy-virtual-machine:~$ 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

  

猜你喜欢

转载自www.cnblogs.com/huanggaoyu/p/10056210.html