返回上一頁

移動 WSL 映像檔位置

指令筆記,想偷懶也可以用別人寫好的 powershell 工具 https://github.com/pxlrbt/move-wsl

  1. 列舉所有 WSL
wsl --list
  1. 執行 export
wsl --export {distribution-name} D:\path\2\tarfile\{distribution-name}.tar
  1. 匯入
wsl.exe --import {new-distribution-name} D:\folder\2\install\ D:\path\2\tarfile\{distribution-name}.tar
  1. 移除舊的 distribution
wsl  --unregister {distribution-name}