Can Linux Mint be Installed on WSL

docfreed

Member
Local time
2:45 AM
Posts
16
OS
Windows 10
Hi:
Running Win 11 Home 21H2 (22000.348) on Surgface Pro 7. I know of issues with trying to install Linux on
Surface devices (no touch screen driver, etc). I would like to install WSL 2 and run a Linux Distro.
Can anyone advise me of the possibility of using Linux Mint 20.x on a Surface Pro 7 with WSL?
TIA
 

My Computers

System One System Two

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    ACER
    CPU
    Ryzen 3 3200
  • Operating System
    Win 10
    Computer type
    Tablet
    Manufacturer/Model
    Microsoft Surface Pro 7
    CPU
    Intel I3

jimbo45

Well-known member
Power User
VIP
Local time
7:45 AM
Posts
924
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Hi folks
You can install any distro you like if you can get a .tar image of it and then import into the wsl.

Easiest way is to install in windows via the docker app, then enable wsl integration. Start the default ubuntu wsl and with docker pull the linux mint container. import to wsl then start wsl e.g wsl -d mint (or whatever you have called it) -u userid. If you omit -u parameter you start in root which is probably not what you want, Better to start as a user and add the user to the "sudoers" group.

For docker desktop on windows :


Once you've enabled desktop wsl2 integration you can then just start docker in any wsl linux distro without actually installing docker on that distro -- simply just type docker in the distro's console when you've started the wsl2 console e,g ubuntu.

You can also get a .tar image if you install docker in a linux vm or host and pull the linux mint container. Docker image here :


Note -- you need to download the wsl update from the ms site -- otherwise you will get a error importing a linux image. Update here :


Cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

ish4d0w

Active member
Member
VIP
Local time
8:45 AM
Posts
121
OS
Windows 10
On Windows 11, there is a new shortcut to update WSL2 to the latest version, including downloading the necessary kernel in one go.
I wonder if it can fully replace the previous method (which is still fully usable by the way).

wsl --install

then
wsl --set-default-version 2

I'm not sure if you need Linux Mint specifically, or if Ubuntu would do. (Linux Mint is based on Ubuntu)
Ubuntu is much easier to install on WSL, in the sense that it is available in the Microsoft Store. It supports both WSL and WSL2, but keep in mind that all WSL installations use legacy WSL1 by default unless instructed to use WSL2 (for instance using the command above).
So, make sure to run the command above, before you actually start the VM.
If you missed it, you can still convert it with a different command. No need to reinstall.

If you're looking for a graphical interface, you can use X410 for forwarding. It is also available in the Microsoft Store.
 

My Computer

System One

docfreed

Member
Thread Starter
Local time
2:45 AM
Posts
16
OS
Windows 10
On Windows 11, there is a new shortcut to update WSL2 to the latest version, including downloading the necessary kernel in one go.
I wonder if it can fully replace the previous method (which is still fully usable by the way).

wsl --install

then
wsl --set-default-version 2

I'm not sure if you need Linux Mint specifically, or if Ubuntu would do. (Linux Mint is based on Ubuntu)
Ubuntu is much easier to install on WSL, in the sense that it is available in the Microsoft Store. It supports both WSL and WSL2, but keep in mind that all WSL installations use legacy WSL1 by default unless instructed to use WSL2 (for instance using the command above).
So, make sure to run the command above, before you actually start the VM.
If you missed it, you can still convert it with a different command. No need to reinstall.

If you're looking for a graphical interface, you can use X410 for forwarding. It is also available in the Microsoft Store.
Not sure I understand - do I run the first command (wsl --install) then the second (wsl --set-default-version 2) or just the second? And, I asked about Mint specifically because I run it on other machines.
Of course Ubuntu is probably just as good for my purpose. And thanks for the reply
 

My Computers

System One System Two

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    ACER
    CPU
    Ryzen 3 3200
  • Operating System
    Win 10
    Computer type
    Tablet
    Manufacturer/Model
    Microsoft Surface Pro 7
    CPU
    Intel I3

ish4d0w

Active member
Member
VIP
Local time
8:45 AM
Posts
121
OS
Windows 10
You should run both of them, in order.
If Ubuntu is fine for you, that is much easier to install than Mint. AS step 3, just after running these commands you just download Ubuntu from MS Store and start it. It will then run in WSL2 mode.
 

My Computer

System One

pparks1

Well-known member
Member
VIP
Local time
2:45 AM
Posts
218
OS
Windows 11 Pro

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink SEI8
    CPU
    Intel Core i5-8279u
    Motherboard
    AZW SEI
    Memory
    32GB DDR4 2666Mhz
    Graphics Card(s)
    Intel Iris Plus 655
    Sound Card
    Intel SST
    Monitor(s) Displays
    Asus ProArt PA278QV
    Screen Resolution
    2560x1440
    Hard Drives
    512GB NVMe
    PSU
    NA
    Case
    NA
    Cooling
    NA
    Keyboard
    NA
    Mouse
    NA
    Internet Speed
    500/50
    Browser
    Edge
    Antivirus
    Defender
    Other Info
    Mini PC used for testing Windows 11.

jimbo45

Well-known member
Power User
VIP
Local time
7:45 AM
Posts
924
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Hi folks

On WSL2 it's easy enough to get some graphical programs running -- but I have yet to get anything like a full desktop GUI to work -- currently issues are :

Wayland instead of the older xorg for video / x-server etc,

systemd not implemented - this means the "classical ways of enabling and starting services" e.g systemctl start gddm (starts the GNOME desktop service) don't work as well as DBUS issues.

The kernel is Ms's kernel --even if you import your own distro so trying to battle to get a desktop GUI on WSL is a bit of a thankless task currently. Once somebody has (as I'm sure they will) mastered how to do it and posted working instructions that aren't 1 year out of date (or more) then my advice is if you want a Linux desktop - use a proper VM -- if you just want the odd Windowed program e.g most Linux file managers are infinitely better than the increasingly old fashioned looking file explorer then install something like dolphin.

Samba also is worth installing as your linux file manager can then access files over your network -- and of course can read / write Linux file systems as well as windows (install ntfs-3g for windows ntfs r/w).

Note also Linux File managers can see "long file / path names" and don't suffer the irritation that still bedevils file explorer with the 266 char limit.

Finally if you use torrents - by far the best torrent client is deluge on Linux -- install 2 components -- deluge-gtk and deluge.

These all run on Windowed mode in the WSL on the 4 distros Ive tried so I'd imagine they'd work on yours. No need to install any extra X-Server on Windows such as VCXSRV. I've tried Rocky-Linux 8 (successor for Centos 8), Arch Linux, Ubuntu, and Fedora -- not got a full desktop GUI - even the lean XFCE doesn't appear other than just a black screen on any of them yet but many windowed programs will work -- you have to launch them from the console.


Note also USB devices are easy to attach to the WSL2 distro.

as per Attach USB devices to WSL the EASY way


@pparks1
I tried that on 2 different systems -- failed both times to give me a desktop -- that's on W11 preview release.

I'll have another go on a W10 system which might work - however I just get the feeling I'm fighting a losing battle on this one -- it would of course be nice to have a full desktop GUI in the WSL but some might ask what's the point of say running FF on the WSL when you have it on Windows !! --- my answer would be -- Because you can !! (at least in theory).



Cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

ish4d0w

Active member
Member
VIP
Local time
8:45 AM
Posts
121
OS
Windows 10
I think the missing key here is a window server that can be forwarded to outside of WSL2. WSL2 can run the kernel perfectly fine, but it doesn't have all the "ingredients" to run a full desktop environment. Technically it can run it, but not output it well.
This is where a window server comes in handy. I use X410 https://www.microsoft.com/store/productId/9NLP712ZMN9Q

Of course there might be free alternatives available too but this is the best I have found so far. It is engineered specifically towards WSL2 and it can do a lot of tricks. It can even be used to run Mac OS with WSL2 , KVM and Hyper-V.
(Fair warning: running Mac OS could be illegal unless you're running it on genuine Apple hardware, like I do. But this is just for illustration / you can do the same for Linux perfectly fine, and that is legal)

Preferably choose a distro that runs x.org and not wayland. Wayland makes things complicated in this sense.
 

My Computer

System One

FDretired

Member
Local time
2:45 AM
Posts
80
OS
windows 11
A novice question.

If I install Ubuntu from the store and make a Macrium image of my C drive will it include UBUNTU?
 

My Computer

System One

  • OS
    windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    No Name - Assembled by a Compute shop in a Strip Mall.
    CPU
    Intel i511400
    Motherboard
    ASUS PRIME B560-PLUS motherboard
    Memory
    16 GB
    Graphics Card(s)
    0
    Sound Card
    0
    Monitor(s) Displays
    28 in Samsung
    Screen Resolution
    1920 x 1080
    Hard Drives
    5 SSDs a mixture of Nvme and Sata.
    PSU
    600w
    Case
    Mid Tower DEEP COOL
    Internet Speed
    40 MPS download and 3.5 MPS upload. The condo building is nor wired with Fibe yet
    Browser
    Firefox, Microsoft Edge
    Antivirus
    McAfee - free with Bell account

pparks1

Well-known member
Member
VIP
Local time
2:45 AM
Posts
218
OS
Windows 11 Pro
A novice question.

If I install Ubuntu from the store and make a Macrium image of my C drive will it include UBUNTU?
Yes it will. The Ubuntu instance is nothing more than a VM that runs from a .vhdx file somewhere on your hard drive.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink SEI8
    CPU
    Intel Core i5-8279u
    Motherboard
    AZW SEI
    Memory
    32GB DDR4 2666Mhz
    Graphics Card(s)
    Intel Iris Plus 655
    Sound Card
    Intel SST
    Monitor(s) Displays
    Asus ProArt PA278QV
    Screen Resolution
    2560x1440
    Hard Drives
    512GB NVMe
    PSU
    NA
    Case
    NA
    Cooling
    NA
    Keyboard
    NA
    Mouse
    NA
    Internet Speed
    500/50
    Browser
    Edge
    Antivirus
    Defender
    Other Info
    Mini PC used for testing Windows 11.

jimbo45

Well-known member
Power User
VIP
Local time
7:45 AM
Posts
924
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Yes it will. The Ubuntu instance is nothing more than a VM that runs from a .vhdx file somewhere on your hard drive.
@pparks1

Hi there
Managed to get UBUNTU 18.04 LTS GNOME desktop working in WSL -- another thread. Few glitches in the link you sent -- Note that net 3/3.5 needs to be installed onn Windows or it won't work - dotnet runtime is needed.-- I didn't bother with pulseaudio server as I have sound any way --

I also installed a few KDE programs that can run on GNOME desktop. I'll have a go trying to install the KDE full desktop as an exercise -- there's a desktop switch app that can switch GUI's. The Shortcut didn't work properly so I just run the vbs script from file explorer to start the whole thing. I can't though get RDP to work (xorg / wayland problem) but that's an issue for another day. The main thing that gets this whole stuff working is the systemctl enablement from your link.

Anyway I spent most of today messing around with this so time for a few "bevs". Thanks again though for the link. This stuff gets horribly addictive !!!! Fortunately running totally from an external ssd so no problem if I totally hose up Windows !!

SAMBA works OK, SSH remote works OK -- only thing I can't get working is RDP or SSH into desktop from remote computer - not a mega issue as ssh into console is fine.

Cheers
jimbo
 

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

ish4d0w

Active member
Member
VIP
Local time
8:45 AM
Posts
121
OS
Windows 10
Yes it will. The Ubuntu instance is nothing more than a VM that runs from a .vhdx file somewhere on your hard drive.
This is almost the case, but let me refine it:
If this is WSL2 then it is not a .vhdx file, but a real EXT4 filesystem (with an ext4 extension if I remember correctly) that is directly mounted (feeded raw) by the linux kernel, that is running in parallel to the windows kernel, powered by Hyper-V.

WSL2 is using Hyper-V to run a real Linux kernel in parallel to the Windows kernel, this enables virtualization performance that is lightyears ahead of what WSL1 was.

WSL1 on the other hand, should have used a vhdx file, but didn't. It used a pseudo-filesystem that actually resided in a folder within NTFS and was extremely prone to corruption as per fragile permission management. If you tried to restore a macrium (or any other) backup with WSL1 in it, then the files inside the WSL1 vm could become corrupt, unless it was a sector by sector backup.
However WSL2 fixed this issue for good. You can safely restore WSL2 backups. It doesn't matter if it is sector by sector or not, because the filesystem WSL2 uses, is actually a sector-by-sector EXT4 image that is therefore shielded from such corruption.
 

My Computer

System One

Top Bottom