Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions to install WSL in other than C Drive #42

Open
gp201 opened this issue Oct 14, 2022 · 9 comments
Open

Add instructions to install WSL in other than C Drive #42

gp201 opened this issue Oct 14, 2022 · 9 comments
Labels

Comments

@gp201
Copy link
Contributor

gp201 commented Oct 14, 2022

Currently, some contributors want to install WSL in the D drive instead of the default C Drive. Add instructions to make it simpler.

@gp201 gp201 moved this to Triage in Developer Workflow Team Oct 14, 2022
@U8NWXD U8NWXD moved this from Triage to Not Started in Developer Workflow Team Oct 23, 2022
@Patel-Muhammad
Copy link
Contributor

Hey @U8NWXD , I would like to take this issue.

We can achieve the solution by:

To install the Windows Subsystem for Linux (WSL) on a drive other than the C drive, you will need to perform the following steps:

  1. Open the PowerShell as an administrator and run the command:
  dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

This command enables the Windows Subsystem for Linux feature on the running operating system without restarting the system, allowing the user to use Linux environments and commands within Windows.

  1. Create a new folder on the drive you wish to install WSL on. For example, if you wish to install it on the D drive, you can create a folder called "WSL" in the root of the D drive.

  2. Open the Microsoft Store and search for the Linux distribution you wish to install (e.g. Ubuntu).

  3. Install the Linux distribution to the folder you created in step 2. This will set the distribution's root filesystem to the folder you created.

  4. Once the installation is complete, launch the distribution from the Start menu to finish the setup process.

You should now be able to use the distribution as if it was installed on the C drive.

Note: It's not recommended to install WSL in other than C Drive, as it may cause some issues with system files and software compatibility.

@U8NWXD
Copy link
Member

U8NWXD commented Jan 23, 2023

@Patel-Muhammad Thanks! I'm checking with some people more familiar with WSL to see what they think

@Patel-Muhammad
Copy link
Contributor

@U8NWXD thank you for considering.

@U8NWXD
Copy link
Member

U8NWXD commented Jan 25, 2023

@aks681 uses WSL, so I'm letting them review the proposed solution

@aks681
Copy link
Contributor

aks681 commented Jan 25, 2023

Hey @Patel-Muhammad. Thanks for the info, I used to have it in D drive some time back, though use C now. Couple of comments:

  • Can you detail how to change directory when installing from Store? Since, I think that automatically installs to C as well.
  • Have you confirmed this works, and any caveats for this process? You mentioned some issues, any examples? Since considering WSL has its own file system, I expect issues to be minimal in regular use. I remember having some issues trying to use .wslconfig, but don't recall anything else.

@vaishnavi192
Copy link
Contributor

vaishnavi192 commented Jan 10, 2024

hey @U8NWXD @aks681 @gp201 @seanlip i was also using wsl before, now I switched to ubuntu tho.....I know the solution so kindly assign me this issue.
Open the Microsoft Store

Step 1: Open the Microsoft Store app on your Windows .
Step 2: Search for Linux Distribution

In the search bar, type the name of the Linux distribution you want to install (e.g., Ubuntu, Debian).
Step 3: Select the Linux Distribution

Select the Linux distribution from the search results and click on it to open the installation page.
Step 4: Choose the Installation Drive and Directory

On the installation page, click on the "Get" or "Install" button.
When prompted, select "Choose a drive" to specify the non-default drive where you want to install the distribution.
Then, either navigate to the desired directory on the selected drive or create a new folder for the Linux distribution.
Step 5: Install the Distribution

After choosing the installation drive and directory, click on the "Install" button to start the installation process.
Allow the installation to complete, which may take some time depending on your system and internet speed.
Step 6: Enable WSL (if not already enabled)

If WSL is not yet enabled, open PowerShell as an administrator and run the following command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Step 7: Set Up the Distribution

Once the installation is complete, open the installed Linux distribution from the Start menu or by searching for its name.
kindly assign me this issue

@gp201
Copy link
Contributor Author

gp201 commented Jan 12, 2024

@vaishnavi192 Can you provide a video/documentation link showing that it worked

@vaishnavi192
Copy link
Contributor

vaishnavi192 commented Jan 13, 2024

hey @gp201 idky but My microsoft store is not working rn in windows(hanging). And btw I thought we have to download ubuntu. So, those instructions won't work sorry. Today I read about this article https://dev.to/mefaba/installing-wsl-on-another-drive-in-windows-5c4a
According to this we can't directly change the location and download wsl(I checked in other websites also)... we have to export it in other drive with given commands. Would you like to give any comments on this.

@gp201
Copy link
Contributor Author

gp201 commented Jan 15, 2024

@vaishnavi192 That's unfortunate. Thank you for sharing the blog.
If someone is able to test it, we can include it in the wiki. This is to guarantee that all commands we instruct developers to execute are verified by us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

5 participants