win10 子系统 ubuntu
2018-03-09 本文已影响516人
9682f4e55d71
问题 1
https://docs.microsoft.com/en-us/windows/wsl/install-win10
The WSL optional component is not enabled. Please enable it and try again.
See https://aka.ms/wslinstall for details.
Error: 0x8007007e
Press any key to continue...
在解决: powershell 执行
https://docs.microsoft.com/en-us/windows/wsl/install-win10
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
问题 2
root@ubuntu-pc:~# tree
The program 'tree' is currently not installed. You can install it by typing:
apt install tree
root@ubuntu-pc:~# apt install tree
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package tree
替换 ali 源 apt-get update 后解决
cp /etc/apt/sources.list /etc/apt/sources.list.backup
https://opsx.alibaba.com/mirror
修改 umask 与linux系统保持一致,使得建立的文件默认权限正常
root@ubuntu-pc:~# umask # 查看
0000
root@ubuntu-pc:~# umask 022 # 修改
root@ubuntu-pc:~# umask
0022
访问windows文件
ln -s /mnt/c /c
ln -s /mnt/d /d
终端使用cmder, startup 参数修改成
%windir%\system32\bash.exe ~