Linux/Ubuntu 的日常升级和安全更新,如何操作?

简介: Linux/Ubuntu 的日常升级和安全更新,如何操作?


我安装的是Ubuntu 20.04.6 LTS的Windows上Linux子系统版本,启动完成后显示:

Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.15.90.4-microsoft-standard-WSL2 x86_64)

* Documentation:  https://help.ubuntu.com

* Management:     https://landscape.canonical.com

* Support:        https://ubuntu.com/advantage

 System information as of Sun Aug 20 09:42:18 CST 2023

 System load:  0.64                Processes:             132

 Usage of /:   1.0% of 1006.85GB   Users logged in:       0

 Memory usage: 9%                  IPv4 address for eth0: 172.*.*.151

 Swap usage:   0%

* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s

  just raised the bar for easy, resilient and secure K8s cluster deployment.

  https://ubuntu.com/engage/secure-kubernetes-at-the-edge

Expanded Security Maintenance for Applications is not enabled.

1 update can be applied immediately.
To see these additional updates run: apt list --upgradable

8 additional security updates can be applied with ESM Apps.

Learn more about enabling ESM Apps service at https://ubuntu.com/esm

This message is shown once a day. To disable it please create the

/home/hann/.hushlogin file.

启动信息告知:有1个升级可以立即更新,另外ESM应用程序有8个额外的安全更新。

更新内容列表:

hann@HannYang:~$  apt list --upgradable

Listing... Done

cloud-init/focal-updates 23.2.2-0ubuntu0~20.04.1 all [upgradable from: 23.2.1-0ubuntu0~20.04.2]

N: There are 3 additional versions. Please use the '-a' switch to see them.

hann@HannYang:~$  apt list --upgradable -a

Listing... Done

cloud-init/focal-updates 23.2.2-0ubuntu0~20.04.1 all [upgradable from: 23.2.1-0ubuntu0~20.04.2]

cloud-init/now 23.2.1-0ubuntu0~20.04.2 all [installed,upgradable to: 23.2.2-0ubuntu0~20.04.1]

cloud-init/focal-security 23.1.2-0ubuntu0~20.04.2 all

cloud-init/focal 20.1-10-g71af48df-0ubuntu5 all

更新升级操作:

hann@HannYang:~$ sudo apt upgrade

[sudo] password for hann: ******

Reading package lists... Done

Building dependency tree

Reading state information... Done

Calculating upgrade... Done

Get more security updates through Ubuntu Pro with 'esm-apps' enabled:

 exo-utils python2.7-minimal python2.7 libexo-2-0 libexo-common

 libpython2.7-minimal libpython2.7-stdlib libexo-helpers

Learn more about Ubuntu Pro at https://ubuntu.com/pro

#

# You can verify the status of security fixes using the `pro fix` command.

# E.g., a recent Ruby vulnerability can be checked with: `pro fix USN-6219-1`

# For more detail see: https://ubuntu.com/security/notices/USN-6219-1

#

The following packages will be upgraded:

 cloud-init

1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Need to get 532 kB of archives.

After this operation, 0 B of additional disk space will be used.

Do you want to continue? [Y/n] Y

Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 cloud-init all 23.2.2-0ubuntu0~20.04.1 [532 kB]

Fetched 532 kB in 2s (226 kB/s)

Preconfiguring packages ...

(Reading database ... 156073 files and directories currently installed.)

Preparing to unpack .../cloud-init_23.2.2-0ubuntu0~20.04.1_all.deb ...

Unpacking cloud-init (23.2.2-0ubuntu0~20.04.1) over (23.2.1-0ubuntu0~20.04.2) ...

Setting up cloud-init (23.2.2-0ubuntu0~20.04.1) ...

Processing triggers for man-db (2.9.1-1) ...

Processing triggers for rsyslog (8.2001.0-1ubuntu1.3) ...

hann@HannYang:~$ sudo apt upgrade cloud-init/focal-updates cloud-init/now cloud-init/focal-security cloud-init/focal

Reading package lists... Done

Building dependency tree

Reading state information... Done

cloud-init is already the newest version (23.2.2-0ubuntu0~20.04.1).

Selected version '23.2.2-0ubuntu0~20.04.1' (Ubuntu:20.04/focal-updates [all]) for 'cloud-init'

Selected version '23.2.2-0ubuntu0~20.04.1' (Ubuntu:20.04/focal-updates [all]) for 'cloud-init'

Selected version '23.1.2-0ubuntu0~20.04.2' (Ubuntu:20.04/focal-security [all]) for 'cloud-init'

Selected version '23.2.2-0ubuntu0~20.04.1' (Ubuntu:20.04/focal-updates [all]) for 'cloud-init'

Calculating upgrade... Done

Get more security updates through Ubuntu Pro with 'esm-apps' enabled:

 exo-utils python2.7-minimal python2.7 libexo-2-0 libexo-common

 libpython2.7-minimal libpython2.7-stdlib libexo-helpers

Learn more about Ubuntu Pro at https://ubuntu.com/pro

#

# You can verify the status of security fixes using the `pro fix` command.

# E.g., a recent Ruby vulnerability can be checked with: `pro fix USN-6219-1`

# For more detail see: https://ubuntu.com/security/notices/USN-6219-1

#

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

hann@HannYang:~$ apt list --upgradable

Listing... Done

版本号查询:

hann@HannYang:~$ cat /etc/issue

Ubuntu 20.04.6 LTS \n \l

hann@HannYang:~$ uname -r

5.15.90.4-microsoft-standard-WSL2

本次操作仅为日常升级更新,Ubuntu版本及Linux内核版本都没有升级。


相关实践学习
容器服务Serverless版ACK Serverless 快速入门:在线魔方应用部署和监控
通过本实验,您将了解到容器服务Serverless版ACK Serverless 的基本产品能力,即可以实现快速部署一个在线魔方应用,并借助阿里云容器服务成熟的产品生态,实现在线应用的企业级监控,提升应用稳定性。
云原生实践公开课
课程大纲 开篇:如何学习并实践云原生技术 基础篇: 5 步上手 Kubernetes 进阶篇:生产环境下的 K8s 实践 相关的阿里云产品:容器服务 ACK 容器服务 Kubernetes 版(简称 ACK)提供高性能可伸缩的容器应用管理能力,支持企业级容器化应用的全生命周期管理。整合阿里云虚拟化、存储、网络和安全能力,打造云端最佳容器化应用运行环境。 了解产品详情: https://www.aliyun.com/product/kubernetes
目录
相关文章
|
5天前
|
Ubuntu Linux Python
Linux(15)Ubuntu安装ninja构建工具
Linux(15)Ubuntu安装ninja构建工具
15 0
|
1天前
|
Ubuntu Python
ubuntu升级Python版本
现在,你已成功升级了Python版本并可以使用新版本进行开发和运行程序。
10 1
|
2天前
|
Ubuntu Linux
Linux(Ubuntu)系统临时IP以及静态IP配置(关闭、启动网卡等操作)
请注意,以上步骤是在临时基础上进行配置的。如果要永久保存静态IP地址,通常还需要修改 `/etc/network/interfaces`文件,以便在系统重启后保持配置。同时,确保备份相关配置文件以防止出现问题。
13 1
|
4天前
|
Ubuntu Linux 测试技术
Linux(32)Rockchip RK3568 Ubuntu22.04上部署 Docker: 详细配置与功能测试(下)
Linux(32)Rockchip RK3568 Ubuntu22.04上部署 Docker: 详细配置与功能测试
35 1
|
4天前
|
Ubuntu Linux 数据安全/隐私保护
Linux(24) 如何在Ubuntu中操作rootfs.img文件
Linux(24) 如何在Ubuntu中操作rootfs.img文件
9 0
|
5天前
|
Ubuntu 网络协议 Linux
Linux(20) Ubuntu 20.04 网络接口自动切换路由配置
Linux(20) Ubuntu 20.04 网络接口自动切换路由配置
28 0
|
5天前
|
Ubuntu Linux 数据安全/隐私保护
Linux(7)Ubuntu20.04 arm64安装Docker
Linux(7)Ubuntu20.04 arm64安装Docker
19 0
|
5天前
|
Ubuntu Linux 芯片
Linux(2)ubuntu rootfs根文件系统制作
Linux(2)ubuntu rootfs根文件系统制作
19 0
|
30天前
|
Ubuntu NoSQL 关系型数据库
Ubuntu系统下安装常用软件
Ubuntu系统下安装常用软件
59 0
Ubuntu系统下安装常用软件
|
1月前
|
Ubuntu 关系型数据库 MySQL
Ubuntu 中apt 安装MySQL数据库
Ubuntu 中apt 安装MySQL数据库
69 0