Windows 10 WSL Ubuntu 环境概述
2026年4月23日,Windows 平台上的 Ubuntu 20.04 已支持使用 Ubuntu Terminal 执行 bash、ssh、git、apt 等命令行实用程序。该功能要求 Windows 10 版本不低于 16215.0,兼容 ARM64 和 x64 架构,但不支持 Windows 10 S 系统。
针对希望进行系统升级的用户,具体操作步骤如下:
本指南仅适用于已经安装并拥有 Ubuntu 环境的用户。
首先打开 Ubuntu 终端或 Windows Terminal,输入并运行命令 do-release-upgrade 以检查更新。
frank@LAPTOP-0OCJTGJR:~$ do-release-upgrade
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS develoment release
set Prompt=normal in /etc/update-manager/release-upgrades.
执行后可能会遇到报错信息,提示无法直接升级。
此时需要编辑配置文件 sudo vi /etc/update-manager/release-upgrades。
# Default behavior for the release upgrader.
[DEFAULT]
# Default prompting behavior, valid options:
#
# never - Never check for, or allow upgrading to, a new release.
# normal - Check to see if a new release is available. If more than one new
# release is found, the release upgrader will attempt to upgrade to
# the supported release that immediately succeeds the
# currently-running release.
# lts - Check to see if a new LTS release is available. The upgrader
# will attempt to upgrade to the first LTS release available after
# the currently-running one. Note that if this option is used and
# the currently-running release is not itself an LTS release the
# upgrader will assume prompt was meant to be normal.
#Prompt=lts
Prompt=normal
在默认配置中 Prompt 设置为 lts,需将其修改为 Prompt=normal,随后重新执行 do-release-upgrade 命令。
升级过程中系统将暂停两次,等待用户进行人工确认。
Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating the changes
Calculating the changes
Do you want to start the upgrade?
40 packages are going to be removed. 424 new packages are going to be
installed. 690 packages are going to be upgraded.
You have to download a total of 547 M. This download will take about
6 minutes with your connection.
Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.
Continue [yN] Details [d]y
整个升级流程大约需要 30 分钟以上即可完成。
以下是相关参考资料链接:
Windows Subsystem for Linux(WSL)文件系统改进 第41章——从 Windows 命令行运行 Linux 工具 第42章——从 WSL 运行 Windows 工具
以上就是在 Windows 10 上更新 Ubuntu 20.04 LTS 的详细步骤。如需了解更多相关内容,建议搜索本站历史文章或继续阅读后续教程,感谢大家的支持!