How to install Linux Mint on WSL for Windows 10 and 11


    Linux Mint on WSLSource: Windows Central

    The Windows Subsystem for Linux (WSL) is an incredibly powerful tool for both Windows 10 and Windows 11 with a raft of easily installable distros at hand in the Microsoft Store. But you’re not limited to only those available through the Store. It’s perfectly possible to install other distributions using the built-in WSL tools so long as you have the right files on hand.

    In some cases, such as Ubuntu, you can install the latest rolling release with an official image. In others, we turn to the WSL community for assistance, and that’s exactly the case for anyone looking to install Linux Mint right now.

    Thanks to a project hosted on GitHub, installing Linux Mint onto WSL is a breeze, and furthermore, it’s already on the latest version, Linux Mint 20.3.

    How to install Linux Mint on WSL

    Linux Mint on WSLSource: Windows Central

    Linux Mint is an Ubuntu-based Linux distribution and is certainly one of the more mainstream options out there, often praised as a perfect place for Windows converts to begin. Of course, using Linux in WSL is a little different from just loading it up on a PC, but if you need it or just want it, you can have it.

    So, if you want to use it on WSL, you’ll be needing to use an excellent community project simply called LinuxmintWSL. It’s hosted at GitHub, so the first port of call is to load up its repository. It’s also only built for WSL 2, so if you aren’t using that yet, check out our full guide to get ready. It does, however, support both Intel/AMD and ARM machines, so Windows on ARM users aren’t left out.

    On the GitHub repository, hit the releases page and download the latest package. Once downloaded, extract the zip file to the directory you want to run it from, then simply run Mint.exe. Unlike installing Ubuntu’s latest releases from one of the official images, this has been bundled up to resemble more the distros you would download from the Microsoft Store.

    It’ll take a few seconds (or longer depending on your hardware) to run its installation, but the installer doesn’t require any interaction from you. It’ll open a terminal window and when it’s complete you’ll be asked to press Enter. The terminal window will then close.

    If you use Windows Terminal, Mint will now show in the dropdown menu to launch the next time you load it up. If you don’t, you can launch it through PowerShell the same as any other Linux distro with this command:

    wsl -d Mint
    

    By default you’ll only have root access, so you’ll need to do some basic setup before you get rolling.

    How to set up Linux Mint on WSL

    Linux Mint on WSLSource: Windows Central

    Enter Mint in your terminal using one of the methods described above. You’ll be presented with a basic prompt that begins with root@. As with any other Linux distro on WSL, you’ll want to add a user to Mint with the right permissions before doing anything. You don’t have a password, either, so you’ll need to add one of those before beginning.

    In the terminal enter:

    passwd
    

    Follow the prompts to set a root password. Next, we’ll add a user with:

    useradd -m <username>
    

    And then we’ll follow that up with a password for the user with:

    passwd <username>
    

    Again, follow the prompts to add your password. These commands have added a root password, a user, and a user password.

    The next step is to add the right permissions to your user to be able to use the sudo command, otherwise you’ll be met with an error. We can do this by entering:

    usermod -aG sudo <yourusername>
    

    You can then switch to your user with:

    su <username>
    

    The next thing to do is to ensure that when you launch Mint if you want to be user and not root (which is advisable), you configure it so you don’t have to manually do it every time. There are two ways to do this, the first is with the wsl.conf file and the second is by configuring Windows Terminal if you use that.

    You won’t have a wsl.conf file when you first set up Linux Mint, so we’ll need to create that and enter the right settings. As we’re going to be inside the /etc/ directory it’s easiest to be root for this one. In the terminal as root enter:

    nano /etc/wsl.conf
    

    wsl.confSource: Windows Central

    The Nano text editor will now open with a new blank file. Enter this block into the file:

    # Set the user when launching a distribution with WSL.
    [user]
    default=YourUserName
    

    Hit Ctrl + X followed by Y and then Enter to save and exit. Close down your Linux Mint instance, wait a few seconds (eight is the official line from Microsoft), and then when you relaunch you should be ready to go, already logged in as user.

    Alternatively, if you’re using Windows Terminal, open the Settings, find your Linux Mint install in the sidebar, and then in the command line box ensure this command is stored:

    wsl.exe -d <distroname> -u <yourusername>
    

    This will have the same effect once closed down and restarted. Setting up a wsl.conf file is preferable, though, as it ensures you’re always entering as user. If you use the Windows Terminal settings and you load up Linux Mint via PowerShell, you’ll be taken in as root.

    That’s all there is to it. Linux Mint is now set up on WSL for you to use just like any other you would install through the Microsoft Store. You may find some GUI apps have appeared in your Start menu as well that come with the standard installation of Linux Mint, but those can all be removed if you don’t want them (and the chances are you don’t).

    Additionally, you can run multiple instances of Linux Mint on WSL. For each subsequent installation, simply change the name of the Mint.exe file from the top of this guide to something else, then run it again. The new instance will be set up with the changed file name.





    Source link

    Previous articleBank CEO predicts bitcoin price will hit new record high in 2022
    Next article‘Fan Controlled Football League’ Goes Crypto With $40M Investment From Animoca, Delphi – CoinDesk