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


相关实践学习
深入解析Docker容器化技术
Docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器上,也可以实现虚拟化,容器是完全使用沙箱机制,相互之间不会有任何接口。Docker是世界领先的软件容器平台。开发人员利用Docker可以消除协作编码时“在我的机器上可正常工作”的问题。运维人员利用Docker可以在隔离容器中并行运行和管理应用,获得更好的计算密度。企业利用Docker可以构建敏捷的软件交付管道,以更快的速度、更高的安全性和可靠的信誉为Linux和Windows Server应用发布新功能。 在本套课程中,我们将全面的讲解Docker技术栈,从环境安装到容器、镜像操作以及生产环境如何部署开发的微服务应用。本课程由黑马程序员提供。     相关的阿里云产品:容器服务 ACK 容器服务 Kubernetes 版(简称 ACK)提供高性能可伸缩的容器应用管理能力,支持企业级容器化应用的全生命周期管理。整合阿里云虚拟化、存储、网络和安全能力,打造云端最佳容器化应用运行环境。 了解产品详情: https://www.aliyun.com/product/kubernetes
目录
相关文章
|
6月前
|
安全 Linux 编译器
BigCloud Enterprise Linux 8和Rocky Linux 8升级OpenSSH步骤
本文介绍了在BigCloud Enterprise Linux 8.2/8.6和Rocky Linux 8.10上升级OpenSSH的详细步骤。首先配置Telnet服务和GCC编译器以确保远程登录安全,接着备份旧版OpenSSH并下载、编译、安装最新版本(如9.9p1)。然后创建新的sshd系统服务配置文件,调整配置并启动服务。最后验证升级效果,关闭不必要的Telnet服务,并处理可能的防火墙和SELinux问题。通过这些步骤可有效修复低版本OpenSSH带来的高危漏洞。
362 13
|
3月前
|
Ubuntu Linux UED
Ubuntu和Debian系统与Hat Linux系列的使用比较
所以,如果你想搞一个家用服务器,或者是个人使用,喜欢新鲜事物,那Ubuntu可能是你的最好选择。如果你需要一个在商业环境中经受住考验的系统,那Fedora或CentOS可能更符合你的口味。不过记住,CentOS现在是CentOS Stream,中途换马了,所以如果你是稳定性的极端追求者,可能得考虑一下这一变化。而Debian,则适合那些对稳定性需求极高,不太追求软件版本新旧的用户。
150 26
|
3月前
|
Ubuntu 搜索推荐 Linux
Ubuntu/Debian Hat系Linux的便捷操作指南
总的来说,虽然Ubuntu/Debian和Red Hat系列在操作方法上有所不同,但基本概念类似。掌握了包管理和服务管理,可以应对大多数常见的系统管理任务。同时,这两个系统都有丰富的在线资源可以查询,不管你在任务中遇到什么困难,搜索引擎都能帮你找到答案。这些基本技能能让你在Linux的世界里更加自如。
112 26
|
3月前
|
Ubuntu Linux Shell
Linux环境下VSCode快速安装终极指南:debian/ubuntu/linux平台通用
以上就是在Linux环境下安装VSCode的终极指南,抛开繁复的专业词汇,以平易近人的文字、形象生动的比喻让你轻松学会这一过程。别忘了,你的小伙伴VSCode已经在应用菜单里等你了!
928 23
|
4月前
|
Ubuntu 搜索推荐 Linux
详解Ubuntu的strings与grep命令:Linux开发的实用工具。
这就是Ubuntu中的strings和grep命令,透明且强大。我希望你喜欢这个神奇的世界,并能在你的Linux开发旅程上,通过它们找到你的方向。记住,你的电脑是你的舞台,在上面你可以做任何你想做的事,只要你敢于尝试。
285 32
|
4月前
|
安全 Linux iOS开发
PVS‑Studio 7.36 for macOS, Linux & Windows - 代码质量安全静态分析
PVS‑Studio 7.36 for macOS, Linux & Windows - 代码质量安全静态分析
90 1
PVS‑Studio 7.36 for macOS, Linux & Windows - 代码质量安全静态分析
|
5月前
|
Ubuntu Linux 编译器
在Ubuntu Linux系统下如何搭建并安装EDK2
以上就是在Ubuntu Linux系统下搭建并安装EDK2的过程。这个过程可能会有些复杂,但只要按照步骤一步步来,应该不会有太大问题。如果在过程中遇到任何问题,都可以在网上找到相应的解决方案。希望这个指南能对你有所帮助!
212 17
|
6月前
|
Ubuntu 安全 Linux
Linux错误排查:解决Ubuntu 20.4执行sudo apt-get update时出现的libnettle.so.6错误。
很有可能在你得到解决方案时,你也学到了不少Linux修复技巧。祝你处理计算机问题时顺利如麻!永远记得,各种问题总是像老鼠一样从意想不到的地方冒出来。但记住,不管它们跑到哪里,最终都逃不过你的捕鼠器。盖起你的计算机,拾起你的代码,大步向前!
190 28
|
6月前
|
Ubuntu 安全 Linux
Linux错误排查:解决Ubuntu 20.4执行sudo apt-get update时出现的libnettle.so.6错误。
很有可能在你得到解决方案时,你也学到了不少Linux修复技巧。祝你处理计算机问题时顺利如麻!永远记得,各种问题总是像老鼠一样从意想不到的地方冒出来。但记住,不管它们跑到哪里,最终都逃不过你的捕鼠器。盖起你的计算机,拾起你的代码,大步向前!
162 18
|
7月前
|
人工智能 Linux iOS开发
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
354 12
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描