# 手动安装子系统教程

对于本系统来说，我们提供了一个可以快捷使用的子系统镜像，方便用户使用。子系统需要在下载器中点击子系统镜像下载按钮，点击后会安装到安装路径文件夹中，如果安装路径文件夹为空，则会安装到安装器文件夹目录下。

## 一、子系统安装前设置

第一步：打开控制面板，点击`程序`；

<figure><img src="/files/EXU11zcPyxygiqy3pHMw" alt=""><figcaption></figcaption></figure>

第二步：点击`启用或关闭Windows功能`，弹出“Windows功能”窗口，勾选`Hyper-V`、`Windows虚拟机监控程序平台`、`适用于Linux的Windows子系统`、`虚拟机平台`选项，点击`确定`；

<figure><img src="/files/hmGzYzlwgChT6MEn0vHy" alt=""><figcaption></figcaption></figure>

如果是`家庭版windows`，可能会不包含`Hyper-V选项`，也可以直接通过我们提供的`Hyper-V.bat脚本`进行安装，安装链接为：

[`https://sigma.obs.cn-north-4.myhuaweicloud.com/Hyper-V.bat`](https://sigma.obs.cn-north-4.myhuaweicloud.com/Hyper-V.bat)

第三步：完成更改后，点击`立即重新启动`，或稍后手动重启，重启完成设置。

<figure><img src="/files/fqtrPI43P5dM2YkWaGIy" alt=""><figcaption></figcaption></figure>

## 二、下载子系统镜像

若子系统未安装，点击子系统镜像下载按钮，将子系统镜像下载到本地。

<figure><img src="/files/eMopo5SMVnZF4xDB7Lu7" alt=""><figcaption><p>子系统镜像下载路径</p></figcaption></figure>

当然，也可以直接使用链接进行下载：

<https://sigma.obs.cn-north-4.myhuaweicloud.com/WslTar/Sigma.tar>

## 三、手动导入子系统镜像

### 根据子系统基础命令，可以直接完成子系统镜像的导入。

***

```
// 设置默认版本为wsl 2
wsl --set-default-version 2
```

```
// 从Microsoft Store中下载子系统最新版
wsl --update
```

```
// 导入镜像
wsl --import Sigma E:\SigmaFree\WSL E:\SigmaFree\Image\Sigma.tar --version 2
```

其中，`E:\SigmaFree\WSL`需要更改为期望安装的路径，`E:\SigmaFree\Image\Sigma.tar`为镜像文件所在的路径

如果未发生报错，则直接使用即可；

***

### 如果不是初次安装，需要重新安装时，需要提前卸载同名镜像文件

```
// Some code
wsl --unregister Sigma
```

这里需要说明的是，本系统正常使用时，<mark style="color:red;">**子系统名称一定需要命名为Sigma**</mark>，否则仿真系统脚本和程序无法正常工作。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bit-sigma.gitbook.io/tutorials-for-sigma-free/sigma-free-fang-zhen-xi-tong-jian-jie/an-zhuang-zhi-nan/shou-dong-an-zhuang-zi-xi-tong-jiao-cheng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
