一.修改为163.com的源
ubuntu16.04,ubuntu14.04 gedit找不到命令
1)进入Ubuntu系统,打开终端,输入代码:
sudo apt-get remove gedit
sudo apt-get install gedit
1:编辑文件
gedit /etc/apt/sources.list
进行编辑只能在虚拟机的终端才可以,不可以在SecureCRT编辑
2:将文件的信息修改为如下:
deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted
3:apt清除原先的配置并更新
apt-get clean
apt-get update
apt-get upgrade
4:测试安装
apt-get install mysql
5:使用图形界面操作
想要换成163的源的话,可以使用图形界面的方式去:
-----> Ubuntu Software Center
-----> Ubuntu Software
-----> Download from
-----> choose ‘Other…’
-----> choose ‘China
-----> mirrors.163.com
-----> Choose server’
-----> Close
其实它的原理就是修改/etc/apt/sources.list文件为163对应的url
二.修改为aliyun.com的源
1:编辑文件
gedit /etc/apt/sources.list
2:将文件的信息修改为如下:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
3:apt清除原先的配置并更新
apt-get clean
apt-get update
apt-get upgrade
4:测试安装
apt-get install mysql
5:使用图形界面操作
想要换成163的源的话,可以使用图形界面的方式去:
-----> Ubuntu Software Center
-----> Ubuntu Software
-----> Download from
-----> choose ‘Other…’
-----> choose ‘China
-----> mirrors.aliyun.com
-----> Choose server’
-----> Close
其实它的原理就是修改/etc/apt/sources.list文件为mirrors.aliyun.com对应的url