修改文件

桌面版Ubuntu默认非root账户

可以先在 home/user/下新建一个文件source.list-new

将其写为

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src 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-backports main restricted universe multiverse

然后在命令行切换到root用户执行

cp /home/user/source.list-new /etc/apt/source.list

更新源

apt-get update

这一步报错

这是因为系统中有进程在占用apt-get

ps -ef | grep "apt-get"

可以看到

干掉他,然后继续执行

killall apt-get

apt-get update
apt-get upgrade

等一会即可

修改ubuntu默认源的更多相关文章

  1. 修改Ubuntu默认apt下载源

    修改Ubuntu默认apt下载源 默认下载源很慢,改成阿里的下载速度超快 sudo vim /etc/apt/sources.list 将文件内容替换成 deb http://mirrors.aliy ...

  2. 修改Ubuntu默认运行级别,启动字符界面

    Ubuntu的默认开机的runlevel是2,可以用runlevel来查看当前的默认运行级别. debian系(ubuntu是基于debian)的Linux一直是用runlevel 2来默认启动,并且 ...

  3. 【Linux】修改ubuntu默认字符集

    今天把以前的项目移植到linux上了,我装的是ubuntu,web服务器是tomcat,发现用freemark模板生成的静态页面全 乱码了,在windows都是正常的,猜想可能是linux字符集的问题 ...

  4. (转)修改 ubuntu 默认启动项

    转自: http://jingyan.baidu.com/article/afd8f4de58959134e386e969.html 当我们安装windows和ubuntu双系统以后,默认启动变成ub ...

  5. 修改Centos默认源

    原文:http://mirrors.aliyun.com/help/centos?spm=5176.bbsr150321.0.0.d6ykiD 1.备份 mv /etc/yum.repos.d/Cen ...

  6. ubuntu系统默认源更改为阿里源

    from:http://blog.csdn.net/minicto/article/details/62240020 ubuntu系统默认源更改为阿里源 ubuntu默认使用的国外的源,在更新的时候会 ...

  7. ubuntu下修改mysql默认字符编码出现的Job failed to start解决办法

    ubuntu下修改mysql默认字符编码出现的Job failed to start解决办法 前几天卸掉了用了好多年的Windows,安装了Ubuntu12.04,就开始各种搭环境.今天装好了MySQ ...

  8. windows7使用Source insight上远程修改ubuntu共享内核源码

    由于本人阅读喜欢使用source insight.前段时间接触了linux核代码,而这份代码只能放在ubuntu服务器上编译,刚开始的时候是在windows上修改,完了之后再copy到服务器上去编译, ...

  9. ubuntu默认的Python版本号修改

    ubuntu默认的Python是2.7版本的,键入Python3 就可以使用Python3.X版本.下面修改默认的Python版本, 1.删除/usr/bin 下的Python链接 sudo rm / ...

随机推荐

  1. python列表的增删改查和嵌套

    列表 python常用的数据类型 可承载任意的数据类型 列表是有序的,可索引.切片(步长) 列表的创建 list1 = [1, 2, 'whll'] #1. list2 = list() #2. #3 ...

  2. 前端实现图片上传预览并转换base64

    前端实现文件的上传,就必须用到input标签,type属性为file. 在vue项目中通ref操作dom.input有一个属性accept,是必须要搭配type=file使用. multiple可以上 ...

  3. Arraylist的源码学习

    @ 目录 ArrayList简介 ArrayList核心源码 ArrayList源码分析 System.arraycopy()和Arrays.copyOf()方法 两者联系与区别 ArrayList ...

  4. Storm与SparkStreaming对比

    Storm与SparkStreaming对比 ◆ Spark Streaming 批处理的性能比Storm高出几十倍.◆ Streaming采用小批量模式,Storm是一条消息一条消息的计算.◆ St ...

  5. linux 强制重启!

    原文链接:https://www.cnblogs.com/wipy/p/4261472.html 有时候,linux 由于硬盘或者其它原因, 某个进程挂住了,怎么也杀不死, 输入 reboot 命令也 ...

  6. linux 使用 FIO 测试磁盘的iops

    原文链接:https://www.iteye.com/blog/elf8848-2168876 一,FIO安装wget http://brick.kernel.dk/snaps/fio-2.2.5.t ...

  7. 百钱百鸡小游戏PHP代码

    <?php // 计算小鸡的数量 $count=[]; // 第一个for循环计算公鸡 for ($gj=1;$gj<(100/5);$gj++){ // 第二个for循环计算母鸡 for ...

  8. 月历输出php代码

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. 谱聚类的python实现

    什么是谱聚类? 就是找到一个合适的切割点将图进行切割,核心思想就是: 使得切割的边的权重和最小,对于无向图而言就是切割的边数最少,如上所示.但是,切割的时候可能会存在局部最优,有以下两种方法: (1) ...

  10. anaconda3 安装pip3

    事先安装了anaconda3版本,此时想要安装pip3,需要: https://bootstrap.pypa.io/get-pip.py 打开链接,将文本存到本地,命名为get_pip.py. 然后通 ...