After reboot continue
Open a CMD session as Administrator
wsl.exe --install
Right mouse click the Ubuntu window and go to "properties->Options".
Set Ctrl+Shift+C/V as Copy/Paste
sudo sh -c "echo '$USER ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"
sudo apt install zsh
chsh -s $(which zsh)
-
Open Powershell as Administrator
-
allow scripts to be executed in powershell
Set-ExecutionPolicy unrestricted
- clone the powerline fonts repo
git clone https://github.com/powerline/fonts.git
- install the fonts
cd fonts
./install.ps1
- In "WSL Ubuntu Window"->properties->Font, switch to
DejaVu Sans Mono for Powerline
In a zsh shell:
Add the following to ~/.zshrc
Setup access to PowerShell
export PATH="$PATH:/mnt/c/Windows/System32/WindowsPowerShell/v1.0"
TODO: hook these up to zsh clip plugin, so zsh participates fully in copy/paste
# clipboard interop
wincopy() {
content=$(echo "$1" | base64)
powershell.exe -command Set-Clipboard -Value "$content"
}
winpaste() {
content=$(powershell.exe -command Get-Clipboard)
decoded=$(echo "$content" | base64 --decode 2>/dev/null)
echo "$decoded"
}
Usage:
wincopy "I'm a little teapot"
winpaste
Setup $PATH with access to Windows system executables
export PATH="$PATH:/mnt/c/Windows/System32:/mnt/c/Windows\SysWOW64"This is not necessary but does provide path access to win32/wow64 binaries
# install docker
sudo apt-get update
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \\n "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \\n $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo service docker start
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo service docker start
sudo service docker status
sudo usermod -aG docker ${USER}
su - ${USER}
docker ps
# install docker-compose
sudo apt install docker-compose
# install lazydocker
wget https://github.com/jesseduffield/lazydocker/releases/download/v0.20.0/lazydocker_0.20.0_Linux_x86_64.tar.gz
tar xzvf ./lazydocker_0.20.0_Linux_x86_64.tar.gz
cd ./lazydocker_0.20.0_Linux_x86_64
mkdir ~/bin
mv lazydocker ~/bin/
echo 'export PATH="$HOME/bin:$PATH"' > ~/.zshrc
Attended
docker run -it alpine /bin/sh
Unattended
docker run -d alpine sleep infinity
TODO: research wsl Linux services starting at Windows boot time
echo "sudo service docker status || sudo service docker start" >> "$HOME/.profile"
Install support for
- Unity
- C++
- .NET
- Python
- Node