ubuntu-22.04特效及更新apt源

1. Ubuntu 22.04(Jammy Jellyfish)关键特性

22.04 是 LTS(长期支持),关键词只有三个:稳定、可预测、工程化成熟。它不是追新,而是把近几年 Linux 桌面与服务器的“可用成果”一次性固化。

1.1 生命周期特性

  • 官方支持周期:5 年(到 2027)
  • ESM 可扩展到 10 年(企业级)
  • 适合生产环境、长期运行节点、个人主力桌面

1.2 Linux Kernel 5.15(HWE 可更新)

  • 更好的 CPU 调度(尤其是新一代 Intel / AMD)
  • 原生支持 Apple M1(基础可用)
  • 文件系统性能与稳定性改进(ext4 / xfs)

对服务器与桌面是双赢。

1.3 systemd 249

  • 更快的启动路径
  • cgroup v2 成为主流
  • 服务资源隔离更细粒度

这对容器、K8s 节点非常关键。

1.4 Netplan + NetworkManager 成熟化

  • YAML 网络配置标准化
  • 桌面与服务器统一网络抽象层
  • 更适合自动化与 IaC

1.5语言与运行时

  • Python 3.10(系统默认)
  • Go、Rust、OpenJDK 全部更新到稳定主线
  • 更适合现代云原生工具链

1.6容器友好

  • 原生支持 cgroup v2
  • Docker / containerd / CRI-O 全部可用
  • 对 Kubernetes 1.24+ 更友好

1.7云镜像优化

  • AWS / Azure / GCP 官方镜像同步
  • 启动速度与 cloud-init 更稳定
  • 适合作为基础镜像长期滚动

2.download ubuntu-22.04.5-live-server-amd64.iso

公网下载

vpc内下载

3.设置apt源为国内加速地址

# 3.1 backup /etc/apt/sources.list
cd /etc/apt/  && mv sources.list sources.list.bak

# 3.2 cover sources.list
cat >sources.list <<EOF
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
EOF

# 3.3 update index
apt-get update