Chapter 8: Working with WSL Distros
In Chapter 2, Installing and Configuring the Windows Subsystem for Linux, in the Introducing the wsl command section, we saw how we can use the wsl
command to list the distributions (distros) that we have installed, run commands in them, and terminate them as needed.
We will revisit distros in this chapter, this time looking at them from more of a distro management perspective. In particular, we will look at how you can use the export
and import
commands to back up a distro or copy it to another machine. We will also look at how you can quickly create a new distro based on a Docker container image to enable you to easily create your own distros ready with any dependencies installed.
In this chapter, we're going to cover the following main topics:
- Exporting and importing a WSL distro
- Creating and running a custom distro
We'll start the chapter by looking at how to export and import WSL distros.