ubuntu16更换更新源,其他版本类似...

in 学习笔记 with 0 comment

1、查看更新源是否可用
1 sudo apt‐get update #更新更新源
2、修改更新源
寻找合适的更新源,百度搜索对应系统版本的更新源!(以阿里云为例):
https://www.cnblogs.com/bovenson/p/5752213.html

1 cd /etc/apt
2 ls
3 sudo cp sources.list sources.list_back
4 sudo nano sources.list
5 清空文本内容
6 将网上 搜到的 更新源 赋值到 改文件中 保存并退出
7 sudo apt‐get update

阿里云镜像源:

# 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


在Ubuntu中,可以使用以下命令来进行系统的安全更新:

sudo apt update && sudo apt upgrade -y --only-upgrade
Responses