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

相关推荐
莫逸雪1 天前
Nodemo使用学习
学习·编辑器·vim
thisbrand1 天前
李辉《曾国藩日记》笔记:放不下对诗的情节
笔记·曾国藩
сокол1 天前
【网安-Web渗透测试-靶场系列】AWD-Platform(ctf-hub)
linux·服务器·ubuntu·网络安全·docker
摇滚侠1 天前
Java 零基础全套教程,File 类与 IO 流,笔记 177-178
java·开发语言·笔记
观浩1 天前
使用Obsidian和IDEA搭建个人知识库
经验分享·笔记·学习方法
玄米乌龙茶1231 天前
LLM成长笔记(十三):系统设计与项目实战
笔记·unity·游戏引擎
searchforAI1 天前
AI多模态技术:从语音识别到AI结构化笔记是怎么实现的
人工智能·经验分享·笔记·gpt·whisper·语音识别
凉、介1 天前
深入理解 ARMv7-A|异常/中断处理
笔记·学习·嵌入式·arm
koo3641 天前
周报5.24
笔记
tianrun12341 天前
Ubuntu 24.04 安装 Fcitx5 + Rime + 搜狗词库(替代 IBus 与 Linux 搜狗输入法)
linux·运维·ubuntu