Install ubuntu on wsl(windows subsystem for linux)
To get a list of Linux distributions available to install in wsl
How to Install a WSL Distribution with a Custom Name and Custom Location
By default, when you install a Linux distribution using Windows Subsystem for Linux (WSL), Windows stores the distro in its standard app‑package directory under your user profile. This works fine for most users, but developers often need more control — for example:
keeping work and personal environments separate
placing distros on a faster SSD
storing distros on a larger secondary drive
organizing multiple environments in a predictable folder structure
WSL provides two optional arguments to help with this:
--name— lets you assign a custom, human‑friendly name--location— lets you choose where the distro’s virtual disk (ext4.vhdx) will be stored
What --location Means (Generic Explanation)
The --location argument tells WSL to install the distribution’s filesystem into any folder you choose, instead of the default %LOCALAPPDATA%\Packages\…\LocalState.
You can point it to any empty folder on any drive, such as:
D:\WSL\UbuntuDevE:\Linux\ProdBoxC:\VM\WSL\MyDistro
WSL will place the distro’s ext4.vhdx file inside that folder.
Generic Command Format
Examples
Requirements for --location
The folder must already exist
The folder must be empty
The path must be a local drive (USB, SSD, HDD all fine)
WSL will create the distro’s virtual disk inside that folder




Comments
Post a Comment