Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup Windows 11 Discussion

Chris Oliver asked in General

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)

Reply

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.

Reply

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

Reply

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.

Reply

Sounds like you've got a solid Windows 11 setup going on!

Reply

Setting up WSL2 Debian and running RubyMine ES Beta sounds like quite the adventure.

Reply

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.

Reply

It helps.
This is a nice article.

Reply

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.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,400+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.