Skip to content

Instantly share code, notes, and snippets.

@rrmistry
Created June 4, 2019 02:13
Show Gist options
  • Save rrmistry/574e8165db0241041c07c8b7536c0295 to your computer and use it in GitHub Desktop.
Save rrmistry/574e8165db0241041c07c8b7536c0295 to your computer and use it in GitHub Desktop.
Installing Windows-SubModule-Linux (WSL) manually on another drive
# MIT License
# Copyright (c) 2019 Rohit Mistry
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Guide: Installing WSL manually on a non-system drive
## 1. Enable the WSL subsystem.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
## 2. Create an installation directory
New-Item D:\Ubuntu -ItemType Directory
Set-Location D:\Ubuntu
## 3. Download a Linux distribution
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile Ubuntu.appx -UseBasicParsing
Rename-Item .\Ubuntu.appx Ubuntu.zip
Expand-Archive .\Ubuntu.zip -Verbose -DestinationPath .\
## 4. Install the Linux distribution
.\ubuntu1804.exe
## 5. Check Installation
wslconfig /list /all
@Sebazzz
Copy link

Sebazzz commented Jun 4, 2019

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment