GithubHelp home page GithubHelp logo

countzero / wsl_debian Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 30 KB

Provisioning of a Debian operating system in the Windows Subsystem for Linux (WSL).

License: MIT License

PowerShell 15.88% Shell 84.12%
wsl windows-subsystem linux wsl-debian

wsl_debian's Introduction

WSL Debian

This project automates the installation and provisioning of the official Debian app for the Windows Subsystem for Linux.

Automated tasks

The following tasks have been automated:

  • Installation of the Windows Subsystem for Linux
  • Installation of the official Debian app
  • Distribution upgrade of Debian
  • Installation of common packages
  • Configuration of all Debian users

Installation

1. Clone this repository

Clone the wsl_debian repository to a specific place on your machine via:

git clone git@github.com:countzero/wsl_debian.git C:\wsl_debian

2. Install the Windows Subsystem for Linux and Debian

Execute the provisioning/install_wsl_debian.ps1 PowerShell script:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\wsl_debian\provisioning\install_wsl_debian.ps1"

3. Set up UNIX username and password

Define a UNIX username and password upon the first start of the debian process.

Note

The installation script has launched the debian process automatically for you.

4. Provision the Debian installation

Execute the provisioning/provision_wsl_debian.sh Bash script as the root user within the debian distribution:

wsl.exe --distribution debian --user root /mnt/c/wsl_debian/provisioning/provision_wsl_debian.sh

Important

Do not use sudo within Debian to become root because that will cause the distribution upgrade to fail: microsoft/WSL#4279 (comment)

Uninstall (optional)

Uninstall the Debian App

Execute the following in a PowerShell with elevated rights to remove the Debian App:

Get-AppxPackage *TheDebianProject.DebianGNULinux* | Remove-AppxPackage

Disable the Windows Subsystem for Linux

Execute the following in a PowerShell with elevated rights to disable the Windows Subsystem for Linux:

dism.exe /online `
         /disable-feature `
         /featurename:Microsoft-Windows-Subsystem-Linux `
         /norestart

Troubleshooting

WSL 2 is not working

Please read the following ressources for up to date hints on what is causing the issue.

WSL 2 breaks VirtualBox

VirtualBox is still too slow to be usable with Hyper-V. Therefore currently you have to switch between WSL 2 or VirtualBox development.

Enable/Disable Hyper-V

Execute the ./tools/enable_hyper_v.ps1 or ./tools/disable_hyper_v.ps1 PowerShell scripts to quickly toggle the availability of Hyper-V.

Warning

That scripts will automatically restart your machine.

wsl_debian's People

Contributors

countzero avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.