ubuntu22.04笔记: 更换为阿里源

没有按照LTS 版本 会遇到下面问题:

参考:https://zhuanlan.zhihu.com/p/691625646

Ubuntu 22.04代号为:jammy

Ubuntu 20.04代号为:focal

Ubuntu 19.04代号为:disco

Ubuntu 18.04代号为:bionic

Ubuntu 17.04代号为:zesty

Ubuntu 16.04代号为:xenial

查询 LTS 版本:

root@user-virtual-machine:~# lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 22.04.4 LTS

Release: 22.04

Codename: jammy

root@user-virtual-machine:~#

修改sources.list文件

sudo gedit /etc/apt/sources.list

在Ubuntu 22.04中使用国内源可以提高软件包下载和更新的速度。以下是如何设置国内源的步骤:

备份原有的sources.list文件:

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

编辑sources.list文件:

sudo nano /etc/apt/sources.list

替换文件内容为国内源。以阿里云源为例,你可以将文件内容替换为以下内容:

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

保存并关闭文件。

更新软件源:

sudo apt update

升级所有安装的包:

sudo apt upgrade

相关推荐
_落纸16 小时前
三大基础无源电子元件——电阻(R)、电感(L)、电容(C)
笔记
Alice-YUE17 小时前
【CSS学习笔记3】css特性
前端·css·笔记·html
2303_Alpha17 小时前
SpringBoot
笔记·学习
绿箭柠檬茶18 小时前
Ubuntu 服务器配置转发网络访问
服务器·网络·ubuntu
风_峰18 小时前
Ubuntu Linux SD卡分区操作
嵌入式硬件·ubuntu·fpga开发
太空的旅行者1 天前
告别双系统——WSL2+UBUNTU在WIN上畅游LINUX
linux·运维·ubuntu
Hello_Embed1 天前
STM32HAL 快速入门(二十):UART 中断改进 —— 环形缓冲区解决数据丢失
笔记·stm32·单片机·学习·嵌入式软件
咸甜适中1 天前
rust语言 (1.88) 学习笔记:客户端和服务器端同在一个项目中
笔记·学习·rust
人工智能训练师1 天前
Ubuntu22.04如何安装新版本的Node.js和npm
linux·运维·前端·人工智能·ubuntu·npm·node.js
Grassto1 天前
RAG 从入门到放弃?丐版 demo 实战笔记(go+python)
笔记