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内核版本都没有升级。


相关实践学习
通过Ingress进行灰度发布
本场景您将运行一个简单的应用,部署一个新的应用用于新的发布,并通过Ingress能力实现灰度发布。
容器应用与集群管理
欢迎来到《容器应用与集群管理》课程,本课程是“云原生容器Clouder认证“系列中的第二阶段。课程将向您介绍与容器集群相关的概念和技术,这些概念和技术可以帮助您了解阿里云容器服务ACK/ACK Serverless的使用。同时,本课程也会向您介绍可以采取的工具、方法和可操作步骤,以帮助您了解如何基于容器服务ACK Serverless构建和管理企业级应用。 学习完本课程后,您将能够: 掌握容器集群、容器编排的基本概念 掌握Kubernetes的基础概念及核心思想 掌握阿里云容器服务ACK/ACK Serverless概念及使用方法 基于容器服务ACK Serverless搭建和管理企业级网站应用
目录
打赏
0
0
0
0
74
分享
相关文章
【Azure App Service】基于Linux创建的App Service是否可以主动升级内置的Nginx版本呢?
基于Linux创建的App Service是否可以主动升级内置的Nginx版本呢?Web App Linux 默认使用的 Nginx 版本是由平台预定义的,无法更改这个版本。
134 77
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
39 12
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
Linux中yum、rpm、apt-get、wget的区别,yum、rpm、apt-get常用命令,CentOS、Ubuntu中安装wget
通过本文,我们详细了解了 `yum`、`rpm`、`apt-get`和 `wget`的区别、常用命令以及在CentOS和Ubuntu中安装 `wget`的方法。`yum`和 `apt-get`是高层次的包管理器,分别用于RPM系和Debian系发行版,能够自动解决依赖问题;而 `rpm`是低层次的包管理工具,适合处理单个包;`wget`则是一个功能强大的下载工具,适用于各种下载任务。在实际使用中,根据系统类型和任务需求选择合适的工具,可以大大提高工作效率和系统管理的便利性。
54 25
|
9天前
|
Ubuntu Linux
背景 Ubuntu起源于南非,其名称“Ubuntu”来源于非洲南部祖鲁语或豪萨语,意为“人性”、“我的存在是因为大家的存在”,这体现了非洲传统的一种价值观。Ubuntu由南非计算机科学家马克·沙特尔沃斯(Mark Shuttleworth)创办,他创立了Canonical公司来推动Ubuntu的发展。Ubuntu的第一个版本于2004年发布,至今已经走过了近20个年头,成为了Linux发行版中的佼佼者。
21 4
Ubuntu Linux
|
2月前
|
Linux缓存管理:如何安全地清理系统缓存
在Linux系统中,内存管理至关重要。本文详细介绍了如何安全地清理系统缓存,特别是通过使用`/proc/sys/vm/drop_caches`接口。内容包括清理缓存的原因、步骤、注意事项和最佳实践,帮助你在必要时优化系统性能。
263 78
Ubuntu20.04搭建嵌入式linux网络加载内核、设备树和根文件系统
使用上述U-Boot命令配置并启动嵌入式设备。如果配置正确,设备将通过TFTP加载内核和设备树,并通过NFS挂载根文件系统。
111 15
nginx修改网站默认根目录及发布(linux、centos、ubuntu)openEuler软件源repo站点
通过合理配置 Nginx,我们可以高效地管理和发布软件源,为用户提供稳定可靠的服务。
216 13
基于Ubuntu24.04原内核6.8.0升级到6.9.0
通过上述步骤,我们在Ubuntu 24.04系统上成功地将内核从6.8.0升级到了6.9.0。升级内核有助于提高系统的安全性和性能,但也可能带来兼容性问题。因此,在升级前备份重要数据,并确保新内核支持所需的所有硬件和软件。通过合理的验证和测试,可以确保系统在新内核上稳定运行。
328 6
Ubuntu Linux目录结构
理解Ubuntu Linux的目录结构对系统管理、维护和故障排除至关重要。每个目录都有其特定的用途和存放内容,通过了解这些目录,可以更高效地管理系统文件,确保系统的稳定运行。希望本文对你深入理解Ubuntu的目录结构有所帮助。
113 1
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等