Gentoo in WSL

WSL stands for Windows Subsystem for Linux. It is a subsystem for running Linux on Windows. Since WSL uses a real Linux kernel running on top of a hypervisor you are effectively running Linux within Windows.

Gentoo can run on top of WSL too.

Installing Gentoo on WSL
You need a stage 3 tarball, and WSL installed. Version 2 is assumed here but these instructions might apply to version 1.

You can use the following command to import Gentoo into WSL. Gentoo = the name of the Linux distribution we are importing.

(path) = the path we want Gentoo to go.

Then we select our stage 3.

We are using WSL version 2.

For example:

Entering and setting up the Gentoo distribution
This is not gonna be a rewrite of the Gentoo handbook, just covering some of the basics to get you started. You can enter the Gentoo distribution on WSL by using the command: Next we need to sync the portage tree:

If you want a more recent portage snapshot.

Configure portage how you normally would using the Gentoo handbook.

You should create and configure a user, this is what WSL prompts you to do when you use one of the prepackaged distros.

You should also set a root password.

Now we have a basic Gentoo system setup in WSL. You can install programs and use it the way you'd normally use Gentoo.