Skip to content

Instantly share code, notes, and snippets.

@daxmc99
Last active May 29, 2020 22:05
Show Gist options
  • Save daxmc99/7bd584f38441387a2aa145bac10d0c61 to your computer and use it in GitHub Desktop.
Save daxmc99/7bd584f38441387a2aa145bac10d0c61 to your computer and use it in GitHub Desktop.
Setting up WSL2 for dev

Due to some issues with shipping at the moment my Macbook is delayed in getting to me and I will using Windows as my dev machine. These are the steps I took to set it up

Enable WSL 2 (basically required for good performance in most dev work)

Decide between Scoop & Chocolately

Install Ubuntu 20.04

Enable VS Code remote work

Add Profile to Windows terminal (guid doesn't matter, just needs to be unique)

Quick tip: Copy to clipboard from WSL: https://www.raymondcamden.com/2017/10/19/copying-to-clipboard-with-windows-subsystem-for-linux

cat file.txt | clip.exe

There are issues.... issues I have encountered that are real blockers to adopting a pure WSL workflow microsoft/terminal#632

https://github.com/microsoft/WSL2-Linux-Kernel/issues/50

microsoft/WSL#4166

microsoft/WSL#994

Useful hack repo: https://github.com/shayne/wsl2-hacks

One way to get systemd working with minimal dependencies (nsenter): https://github.com/sr229/wsl-systemd.git

@LuanVSO
Copy link

LuanVSO commented May 29, 2020

you can create a shortcut with the following command to launch windows terminal as admim:

powershell -NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -Command "start wt -verb runas" 

ps: it briefly shows a conhost window before coming up with the UAC prompt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment