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

相关推荐
_李小白40 分钟前
【OSG学习笔记】Day 18: 碰撞检测与物理交互
笔记·学习·游戏·3d
程序猿小D1 小时前
第25节 Node.js 断言测试
后端·node.js·log4j·编辑器·vim·apache·restful
Clownseven2 小时前
Ubuntu 24.04 LTS 长期支持版发布:对服务器用户意味着什么?新特性、升级建议与性能影响初探
linux·服务器·ubuntu
Smile_Gently2 小时前
基于服务器使用 apt 安装、配置 Nginx
nginx·ubuntu·debian
Moonnnn.2 小时前
【单片机期末】汇编试卷
笔记·学习
无脑学c++5 小时前
Ubuntu下挂载NTFS格式磁盘
linux·运维·ubuntu
蟑螂恶霸5 小时前
github.com 链接127.0.0.1
linux·运维·ubuntu
USER_A0015 小时前
高等数学(下)题型笔记(八)空间解析几何与向量代数
笔记·高等数学
156995 小时前
大语言模型原理与书生大模型提示词工程实践-学习笔记
笔记·学习·语言模型
Lasgalena6 小时前
【小记】2024-2025生物计算类热点问题
笔记·deep learning