美文网首页
ubuntn替换源

ubuntn替换源

作者: 9fbe1619f5ab | 来源:发表于2020-04-01 19:47 被阅读0次

1.查看版本代号:

使用如下命令:

lsb_release -c

得到本系统的系统代号

Ubuntu 14.04 (LTS)代号为trusty。

Ubuntu 16.04 (LTS)代号为xenial

Ubuntu 18.04 (LTS)代号为bionic

2.备份源文件

命令如下:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

3.编辑源列表文件

使用命令:

sudo vim /etc/apt/sources.list

如果报错:sudo:vim:command not found    说明没装vim编辑器

使用命令:

sudo apt-get install vim 安装即可

4.更换源

原有内容全部注释,添加

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-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports 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

5.更新软件列表

运行如下命令:

sudo apt-get update

6.更新软件包

运行如下命令:

sudo apt-get upgrade

相关文章

  • ubuntn替换源

    1.查看版本代号: 使用如下命令: lsb_release -c 得到本系统的系统代号 Ubuntu 14.04 ...

  • node.js安装

    一、替换Home-brew源 替换Homebrew默认源 替换Homebrew-core源 二、通过Homebre...

  • Brew 源的替换

    替换 USTC 镜像 1、替换Homebrew源 重置: 2、替换homebrew-core源 重置: 3、替换h...

  • 替换 pip 默认镜像源

    1、Linux 替换 pip 默认镜像源: 2、Windows 替换 pip 默认镜像源: Python源: py...

  • emacs操作 - 插件篇

    替换软件源 使用emacs默认软件源安装软件速度比较慢,国内的用户一般需要替换软件源,这里我将软件源替换为清华镜像...

  • CocoaPods安装记录

    1. 替换Ruby源 将默认的 RubyGems 替换为ruby-china源 先检查源 结果 移除旧源 添加ru...

  • 替换重置Homebrew源

    做个记录 替换Homebrew Bottles源: 参考:替换Homebrew Bottles源 在中科大源失效或...

  • 替换及重置homebrew默认源

    中科大源 替换官方源: 切换回官方源: 清华源 替换官方源: 切换回官方源:注:该镜像是 Homebrew 的 f...

  • 替换及重置Homebrew默认源

    替换为中科大的源替换brew.git 替换homebrew-core.git 替换Homebrew Bottles...

  • homebrew换源

    替换brew源 官方地址

网友评论

      本文标题:ubuntn替换源

      本文链接:https://www.haomeiwen.com/subject/tezauhtx.html