WSL (Windows Subsystem for Linux)

2018-09-29 15:08  2917人阅读  评论 (0)
Tags: linuxwsl

启动wsl

wsl
bash
ubuntu
ubuntu1604
ubuntu1804

配置

wslconfig

wsl执行命令

wsl command

指定环境执行命令

ubuntu run command
ubuntu run command
ubuntu run command

挂载D盘

sudo mount -t drvfs D: /mnt/d

查看挂载

findmnt

安装路径

%localappdata%\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs

C:\Users\<username>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState

注册表查看安装路径

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss

禁用添加windows PATH环境变量

从 wsl 的 PATH 里边删除 win 的路径

disable_win_path.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LxssManager]
"DistributionFlags"=dword:fffffffd

帮助

wsl --help
wslconfig --help
bash --help
ubuntu --help
ubuntu1604 --help
ubuntu1804 --help
豫ICP备09035262号-1