ubuntu22.04设置国内源

 设置国内源
 
 vim /etc/apt/sources.list

deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
 
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
 
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
 
# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
 
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

 

本文为 Ubuntu 22.04 的阿里云镜像源列表。若为其他版本,将所有jammy更改为其他版本代号即可。
常用的Ubuntu版本代号如下:
Ubuntu 22.04:jammy
Ubuntu 20.04:focal
Ubuntu 18.04:bionic
Ubuntu 16.04:xenia
 

sudo vi /etc/resolv.conf


加上(一定是加上哈)
nameserver 8.8.8.8
nameserver 114.114.114.114


apt update && sudo apt full-upgrade && apt autoremove

 ####设置国内源

你可能感兴趣的:(服务器,linux,运维)