WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Custom install directory/drive

Open arunmathaisk opened this issue 6 months ago • 3 comments

I should be able to choose where i want my distribution to be installed.

arunmathaisk avatar May 26 '25 18:05 arunmathaisk

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

github-actions[bot] avatar May 26 '25 18:05 github-actions[bot]

/feature

arunmathaisk avatar May 26 '25 18:05 arunmathaisk

Diagnostic information
Found '/feature', adding tag 'feature'

github-actions[bot] avatar May 26 '25 18:05 github-actions[bot]

@arunmathaisk WSL already provides that option. From wsl --help:

    --install [Distro] [Options...]
        Install a Windows Subsystem for Linux distribution.
        For a list of valid distributions, use 'wsl.exe --list --online'.

        Options:
            --enable-wsl1
                Enable WSL1 support.

            --fixed-vhd
                Create a fixed-size disk to store the distribution.

            --from-file <Path>
                Install a distribution from a local file.

            --legacy
                Use the legacy distribution manifest.

            --location <Location>
                Set the install path for the distribution.

            --name <Name>
                Set the name of the distribution.

            --no-distribution
                Only install the required optional components, does not install a distribution.

            --no-launch, -n
                Do not launch the distribution after install.

            --version <Version>
                Specifies the version to use for the new distribution.

            --vhd-size <MemoryString>
                Specifies the size of the disk to store the distribution.

            --web-download
                Download the distribution from the internet instead of the Microsoft Store.

zcobol avatar May 27 '25 15:05 zcobol

@zcobol My bad homie. I must be living under a rock

arunmathaisk avatar May 27 '25 16:05 arunmathaisk

Closing this as already fixed! :)

craigloewen-msft avatar May 27 '25 18:05 craigloewen-msft