Forrest logo
back to the wsl tool

wsl:tldr:e04c0

wsl: Import a distribution from a `.tar` file.
$ wsl --import ${distribution} ${path\to\install_location} ${path-to-distro_file-tar}
try on your machine

This command is used to import a Linux distribution into Windows Subsystem for Linux (WSL) on Windows 10 or Windows Server 2019.

Here is a breakdown of the command and its parameters:

  • wsl: This is the command to interact with WSL.

  • --import: This flag is used to specify that you want to import a Linux distribution.

  • ${distribution}: This is a placeholder for the name you want to assign to the imported distribution. You can replace it with the desired name, such as "Ubuntu" or "ArchLinux".

  • ${path\to\install_location}: This is a placeholder for the path where you want to install the distribution on your local machine. You need to specify the actual file system path to the desired location.

  • ${path-to-distro_file-tar}: This is a placeholder for the path to the tar file of the Linux distribution you want to import. This tar file usually ends with the extension ".tar.gz" or ".tar". You need to specify the actual file system path to the tar file.

After providing the necessary values and executing the command, WSL will start importing the specified Linux distribution into the specified installation location.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the wsl tool