notes/article/os/win10/wsl.md

526 B

修复 WSL 子系统文件权限

创建 wsl.conf 文件

$ vim /etc/wsl.conf

写入

[automount]
enabled = true
# root = /mnt/
options = "metadata,umask=22,fmask=11"
# mountFsTab = false

配置 bashrc 或者 zshrc

if [ "$(umask)" = "0000" ]; then
  umask 0022
fi

参考文章

备份和恢复

备份

打开 powershell

wsl --export Debian debian.tar

恢复

wsl --import Debian debian.tar