WSL 攻略
參考微軟官方文件
啟用 windows 功能
- 按下 +R 後在執行視窗輸入
Optionalfeatures
再按 確認 或 Enter ↲
- 勾選 Windows 子系統 Linux 版 後按下 確認
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 等待彈出視窗完成相關步驟
安裝 wsl
移動已安裝系統
下面整理各位爆盤俠會需要的步驟
確認安裝位置
參考這篇文章,以下指令可以確認你系統安裝的位置
像我會呈現
這樣
匯出
參考這篇文章
-
匯出前至少先將要匯出的系統關掉,以下指令擇一使用
wsl --terminate, -t <Distro>
- 終止指定的發佈(系統)。
範例
wsl --shutdown
- 立即終止所有執行中的發佈和 WSL 2 輕量公用程式虛擬機器。
-
使用以下指令進行匯出
wsl --export <Distro> <FileName>
- 將發佈匯出為 tar 檔案。
檔案名稱可以是 - 以用於標準輸出。
範例
取消登錄並刪除
用以下指令將 要搬移的系統 取消登錄並刪除
wsl --unregister <Distro>
- 取消登錄發佈並刪除根檔案系統。
範例
匯入
用以下指令將剛匯出的 tar 檔案匯入到要移動的位置
wsl --import <Distro> <InstallLocation> <FileName> [Options]
-
匯入指定的 tar 檔案作為新發佈。
檔案名稱可以是 - 以用於標準輸入。
選項:
--version <Version>
- 指定要用於新發佈的版本。
範例
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
小提示:你會需要建立資料夾