Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

maflynn

macrumors Haswell
Original poster
May 3, 2009
73,575
43,560
I've always been intrigued by Microsoft's attempt to run Linux inside of windows. With WSL2, both windows and Linux are running as pears both underneath the hypervisor. I've had some fits and stops with trying go get WSL running. I found that you get the best success by installing WSL from the app store and then installing Ubuntu from the app store as well.

Here's some hints/tips that as I keep using, I'll update

If you get this after installing Ubuntu:
Code:
Failed to attach disk 'C:\Users\<User>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/ERROR_FILE_NOT_FOUND

Then try this:
Open a powershell window, type wsl --unregister Ubuntu
Then launch Ubuntu from the Microsoft Store

Update the environment to stop prompting for the sudo password:
Type: sudo visudo
At the bottom of the file, enter: <userid> ALL=(ALL) NOPASSWD: ALL
Save

Install systemd
sudo nano /etc/wsl.conf
systemd=true

From a powershell window type: wsl --shutdown Ubuntu
Close the Ubuntu window and open another

From the powershell window you can start a new Ubuntu instance. Click on the down arrow and select Ubuntu
1672662425292.png
 

maflynn

macrumors Haswell
Original poster
May 3, 2009
73,575
43,560
I've been playing with WSL on and off, and like most other MS technologies. You easily can inconsistent results.

Ive determined in my situation, if you install WSL from the command line and then install ubuntu, it will fail. If you install WSL from the MS app store, and then install Ubuntu, either from the store or command line it will fail.

Unregistering Ubuntu and re-opening it by way of the app store seems to fix it, as mentioned above.

I've tried just for giggles different ways to use WSL, including installing Gnome and was largely unsuccessful.

What appears to be at heart of the issue, is that MS has changed/updated WSL, so many of the directions to install components, or features that find online may not work as advertised.

If this is truely a linux environment running in its own hypervisor space, it shouldn't be so hard, but it is ¯\_(ツ)_/¯

I've given up on using it, and as someone has said on reddit, they're just going to dual boot linux and windows. I may go down that path. I have PopOS running on a spare laptop, and I'll work on that for now.
 

maflynn

macrumors Haswell
Original poster
May 3, 2009
73,575
43,560
Whelp,
I did it, at least this way.
I installed kali linux, and the DM. It wasn't anything related to my skills but this video


The biggest difference is setting up kali and xfce to basically run in WSL and then RDP to remote into the environment. I stumbled upon other suggestions regarding kali I'm going to play with them, but this is exactly what I was wanting
1673032321828.png
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.