Code Monkey home page Code Monkey logo

wsl-manager's Introduction

WSL Manager

An easy way to maintain your WSL distros

It allows you to shrink your distro and move it to another drive or path

Features | Installation | Usage | License | Contributing

Status

License Operating systems Issues Pull requests

Features

  • Shrink your distro
  • Move your distro to another drive or path
  • Restore your distro from a vhdx file

Installation

Download the latest release from the releases page.

If you only want to execute the wsl-manager, you can download the wsl-manager.zip file, extract it and run the wsl-manager.exe file.

Custom build

If you want to build the project yourself, you will need clone the repository and install the dependencies. Here is the commands you need to run:

poetry install
poetry shell

After that, you can run the build script to build the project:

poe build

Usage

When you run the wsl-manager.exe file, you will see the following menu. Here you can choose between shrink and move options.

Main menu

Shrinking

When selecting the shrink option, you will select the distro you want to shrink. After that, you will see the script that will be executed. If you want to continue, just press any key. As you can see in the image below.

Shrink script

Moving

When selecting the move option, you will select the distro you want to move. After that, you will need to select the strategy that you want to use. You can choose between tar file and windows registry. As you can see in the image below.

Warning

The tar file strategy uses official wsl commands and was used by a lot of people. Nevertheless some people had weird issues that resulted in broken WSL disks. Make sure you have a backup of your data, so you can restore in case of an error.

Technical details

If you choose tar file, internally the code will run wsl commands to export the distro to a tar file and then import the distro from the tar file into the new path. Finally, some windows registry keys will be changed to keep the same default user.

If you choose windows registry, the code will move the ext4.vhdx file to the new path and change the windows registry keys that point to the distro path. This is the fastest way to move the distro, but it should be used at your own risk because it not used by default by the wsl. Finally, some windows registry keys will be changed to keep the same default user.

Move strategies

Restoring

When selecting the restore option, you will select the vhdx file of the distro you want to restore. After that, you will input the name of the distro and others information.

License

This project follows the MIT license.

Contributing

Please read CONTRIBUTING.md for details the process for submitting pull requests to us.

wsl-manager's People

Contributors

dependabot[bot] avatar lorhansohaky avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dst1213

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.