Setup Windows 11 Discussion
In case you guys have Windows 10 like me:
1) Run PowerShell as administrator
2) Paste this command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
3) Restart your PC
4) Run PowerShell as administrator again
5) Paste these two commands:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
6) Restart your PC Again
7) Download the Linux Kernel Update Package from
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
8) Then, run powershell as administrator again and paste this command:
wsl --set-default-version 2
9) Install a distro of your choice from the Microsoft Store (Example Ubuntu, Kali Linux)
Note, it is possible to specify where you create your app when you create it in WSL, and even put the app files in the windows filesystem (which may or may not be a good idea - google for info). If you're a linux noob like me and wondering where your app goes by default after you followed these instructions, it's in /home/username/ in the linux filesystem.
also just make sure you are using Ubuntu22.04/WSL2 and higher to unlock systemd.. doing this you will also be able to install gui apps like dbeaver to connect to directly to services inside the WSL container without the need for wsl portforwarding.
any gui's that are apt
installed will show up in windows start menu
I wrote a guide as well will be posting it on the forum and share back here. Great article good to know I wasn't far off from some kind of standard way of doing this (it was all from scratch and some head scratching) I ended up with a Windows 11 WSL2 Debian setup everything is hosted inside WSL no Windows file system required and then running RubyMine ES Beta for the IDE doing a remote WSL connection to the *nix image.
VS Code latest update offers this you restart it in remote server connection mode on mine in the command bar of VS Code it shows WSL Debian remote connection.
Then no need for crazy debugger config ten moving parts Windows setup it happens natively in the image.
It's a bit weird that when I run the server with "rails server", I can't launch localhost:3000 from the browser on my host machine (Win11). Even though I can do that when I work on my jekyll project. With rails I had to install firefox and launch localhost:3000 from inside WSL.
I never windows 11 yet because I have been using windows 10 for a long period of time. It's going well so far. I'm happy with this one.