Windows 11 学院:如何在 Windows 11 上使用 WSL 安装 Ubuntu

系统 Windows
科技媒体 pureinfotech 昨日(2 月 17 日)发布博文,介绍了 3 中简便的方法,让你轻松在 Windows 11 系统中,使用 Windows Subsystem for Linux(WSL)中安装 Ubuntu Linux 发行版。

IT之家 2 月 18 日消息,科技媒体 pureinfotech 昨日(2 月 17 日)发布博文,介绍了 3 中简便的方法,让你轻松在 Windows 11 系统中,使用 Windows Subsystem for Linux(WSL)中安装 Ubuntu Linux 发行版。

一、命令行方式

1.在 Windows 11 上打开开始菜单。

2.搜索 "命令提示符",右键单击顶部结果,然后选择 "以管理员身份运行" 选项。

3.键入以下命令以在 Windows 11 上安装 WSL 和 Ubuntu Linux,然后按下回车键:

wsl --install
  • 1.

4.(可选)如果您已经安装了 WSL,请键入以下命令来安装 Ubuntu,然后按回车键:

wsl --install -d Ubuntu
  • 1.

5.(可选)键入以下命令以查看所有可用的发行版,然后按回车键:

wsl --list --online
  • 1.

6.(可选)键入以下命令以在 Windows 11 上安装特定版本的 Ubuntu,然后按回车键:

wsl --install -d UBUNTU-VERSION
  • 1.

在命令中,将 "UBUNTU-VERSION" 更改为您想要安装的版本名称。此示例安装版本 24.04:

wsl --install -d Ubuntu-24.0
  • 1.

7.重启电脑以完成安装 WSL 和 Ubuntu。

8.根据需要继续进行 Linux 发行版的设置。

二、.wsl tar 格式

1.在您的电脑上下载 Ubuntu.tar.wsl 镜像文件(此链接直接从官方 "Canonical Ubuntu" 存储库下载 Ubuntu 镜像)。

2.在 Windows 11 上打开开始菜单。

3.搜索 "命令提示符",右键单击顶部结果,然后选择 "以管理员身份运行" 选项。

4.输入以下命令以打开包含 ".wsl" 文件的目录,然后按回车键在命令中,更新到您下载软件包的目录的路径。

cd C\Users\USERNAME\Downloads
  • 1.

5.键入以下命令以在 Windows 11 上安装 WSL 和 Ubuntu Linux,然后按回车键:

wsl --install --from-file Ubuntu2404-250130_x64.ws
  • 1.

6.请重启电脑以完成 WSL 和 Ubuntu 的安装。

7.根据需要继续进行 Linux 发行版的设置。

三、Microsoft Store 方式

1.打开应用商店的 Ubuntu 页面。例如,"Ubuntu 24.04 LTS"。

2.点击 "在应用商店中获取" 按钮。

3.点击 "打开" 按钮,即可在 Windows 11 上启动 Ubuntu。

IT之家注:以上图源 pureinfotech

4.按照屏幕上的指示继续操作,完成设置。

责任编辑:姜华 来源: IT之家
相关推荐

2021-09-15 08:00:00

Windows 11Windows微软

2023-01-28 22:04:01

微软Windows 11

2022-01-09 23:02:46

Windows 11Windows微软

2022-12-15 20:55:09

微软Windows 11

2023-06-02 14:26:01

微软WindowsEdge

2023-03-04 13:15:26

Windows 11

2022-12-29 15:55:55

Windows 11

2022-12-22 14:15:02

微软Windows 1

2022-12-15 08:55:41

微软Windows 11

2022-12-17 17:00:21

Windows 11微软

2022-11-16 13:16:23

微软Windows

2021-08-19 08:00:00

Windows 11Windows 10虚拟机

2023-02-18 20:00:50

Windows 11Emoji 15

2023-02-17 14:50:40

Windows 11微软开发

2022-12-25 10:17:50

2022-12-16 21:24:26

微软Windows 11

2018-04-16 09:20:45

Windows 10LinuxWSL

2023-03-09 10:03:32

微软Windows 11

2021-03-11 10:40:45

Windows 10WSL 2Linux

2023-06-30 15:40:57

点赞
收藏

51CTO技术栈公众号