
How to install Manjaro on WSL for Windows 10 and 11
Source: 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 Manjaro.
Thanks to a project hosted on GitHub, installing Manjaro on WSL is a breeze. Let’s get to it.
How to install Manjaro on WSL
Source: Windows Central
So, if you want to use it on WSL, you’ll be needing to use an excellent community project simply called ManjaroWSL. 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.
Source: Windows Central
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.
Source: Windows Central
wsl -d Manjaro
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 Manjaro on WSL
Source: Windows Central
root@
. As with any other Linux distro on WSL, you’ll want to add a user to Manjaro 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
Source: Windows Central
useradd -m <username>
And then we’ll follow that up with a password for the user with:
passwd <username>
Again, follow the prompts to set a password for the user. These commands have added a user, created a home directory for that user with the -m
flag, and added a user password.
Source: Windows Central
usermod --append --groups wheel <username>
You can then switch to your user with:
su <username>
This should work without issue and allow you to execute the sudo command, but if you’re met with an error relating to the sudoers file, you’ll need to make a couple of changes. As root, enter nano /etc/sudoers
and you’ll see a warning that it’s supposed to be read only. Ignore it, but you will need to be a little careful. You’re also really supposed to edit this with visudo
, but for what we’re doing here nano will be ok.
Source: Windows Central
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL
Uncomment (delete the #) on the second line only. Hit Ctrl + X followed by Y and then Enter to save and exit. Now you shouldn’t see any more errors when you switch back to your user.
The next thing to do is to ensure that when you launch Manjaro, 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.
Source: Windows Central
nano /etc/wsl.conf
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 Manjaro instance, wait a few seconds, and when you relaunch you should be ready to roll as user.
Alternatively, if you’re using Windows Terminal, open the Settings, find your Manjaro install in the sidebar, and 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.
How to configure your Manjaro package manager on WSL
Source: Windows Central
Enter this command into your terminal:
sudo pacman-mirrors --country <name>
So, for example, I enter:
sudo pacman-mirrors --country United_Kingdom
For countries with more than one word, separate with an underscore. Once this completes, enter this command to update:
sudo pacman -Syu
You’ll most likely have a bunch of updates that need to install so it’ll take a minute, but Manjaro is extremely fast in WSL.
Source: Windows Central
sudo pacman -S <packagename>
So, for example, to install Neovim you would enter:
sudo pacman -S neovim
Additionally, and perhaps preferably, you can use Manjaro’s own package manager as well. You’ll need to install it, but it might be worth doing as it’s a little more straightforward to interact with than pacman.
To install it enter:
sudo pacman -Syu pamac-gtk
You’re now all set up to get using Manjaro on WSL. As with other distros, you can run multiple separate Manjaro instances, and if you want to install another, simply go back to the beginning of this guide and run it all again. Simply change the filename of the installer before you start, and it will install another instance completely separate to your existing one.