Windows Subsystem for Linux
Install WSL
Enable Windows Subsystem for Linux
- Open Turn Windows features on or off
- Check Windows Subsystem for Linux
- Click OK and Restart
Enable Virtual Machine Platform
- Open PowerShell as administrator
- Enable VMP:
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
- Restart
CLI
wsl -l -v
wsl --set-default-version 2
wslconfig /l
wslconfig /setdefault Debian
wsl --unregister <distroName>
Mounts
$ sudo umount /mnt/c
$ sudo mount -t drvfs C: /mnt/c -o metadata,uid=1000,gid=1000,umask=22,fmask=111
Users
$ sudo usermod -a -G sudo <user>
debian config --default-user <user>
Shell
$ sudo apt-get install zsh
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Ensure zsh
is executed by default:
# ~/.bashrc, after the first comments:
if test -t 1; then
exec zsh
fi
Show full path:
# ~/.oh-my-zsh/themes/robbyrussell.zsh-theme
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
# ^ replace c with ~
source ~/.zshrc