All Projects → pxlrbt → Move Wsl

pxlrbt / Move Wsl

Licence: gpl-3.0
Easily move your WSL distros VHDX file to a new location.

Programming Languages

powershell
5483 projects

Projects that are alternatives of or similar to Move Wsl

Wsl Docker Git Setup
Shell script to configure Windows Subsystem for Linux (WSL) & Ubuntu on Windows to use docker and docker-compose as well as a git-enabled prompt
Stars: ✭ 23 (-94.09%)
Mutual labels:  bash-script, wsl
Perl5 Idea
Perl5 plugins for IntelliJ IDEA
Stars: ✭ 343 (-11.83%)
Mutual labels:  wsl
Vimplus
🚀An automatic configuration program for vim
Stars: ✭ 3,372 (+766.84%)
Mutual labels:  wsl
Wsl Open
Open files with xdg-open on Bash for Windows in Windows applications. Read only mirror from GitLab, see link 👉
Stars: ✭ 299 (-23.14%)
Mutual labels:  wsl
Fedora Remix For Wsl
Fedora Remix for Windows Subsystem for Linux.
Stars: ✭ 284 (-26.99%)
Mutual labels:  wsl
Purse
GPG asymmetric (YubiKey) password manager
Stars: ✭ 313 (-19.54%)
Mutual labels:  bash-script
Remot3d
Remot3d: is a simple tool created for large pentesters as well as just for the pleasure of defacers to control server by backdoors
Stars: ✭ 263 (-32.39%)
Mutual labels:  bash-script
Wsl Ssh Pageant
A Pageant -> TCP bridge for use with WSL, allowing for Pageant to be used as an ssh-ageant within the WSL environment.
Stars: ✭ 381 (-2.06%)
Mutual labels:  wsl
Lnmp
💻 🐳 🐘 🐬 🐧 🚀 Start Docker LNMP(LEMP) In less than 2 minutes Powered by Docker Compose. 让 PHP 开发者快速(一键)搭建基于容器技术(Docker、Kubernetes)的开发、测试、生产(CI/CD by Drone)环境.
Stars: ✭ 341 (-12.34%)
Mutual labels:  wsl
Linuxbashshellscriptforops
Linux Bash Shell Script and Python Script For Ops and Devops
Stars: ✭ 298 (-23.39%)
Mutual labels:  bash-script
My Wsl Setup
Quick rundown on my current setup on the Windows Subsystem for Linux.
Stars: ✭ 298 (-23.39%)
Mutual labels:  wsl
Static status
🚦Bash script to generate a static status page.
Stars: ✭ 286 (-26.48%)
Mutual labels:  bash-script
Dotbare
Manage dotfiles and any git directories interactively with fzf
Stars: ✭ 327 (-15.94%)
Mutual labels:  bash-script
Bash Yaml
Read a yaml file and create variables in bash
Stars: ✭ 278 (-28.53%)
Mutual labels:  bash-script
Larasail
LaraSail - Set Sail with your Laravel app on DigitalOcean
Stars: ✭ 348 (-10.54%)
Mutual labels:  bash-script
Bashcached
memcached server built on bash + socat
Stars: ✭ 270 (-30.59%)
Mutual labels:  bash-script
Wsl Ssh Agent
Helper to interface with Windows ssh-agent.exe service from Windows Subsystem for Linux (WSL)
Stars: ✭ 298 (-23.39%)
Mutual labels:  wsl
Wsl Terminal
Terminal emulator for Windows Subsystem for Linux (WSL)
Stars: ✭ 3,120 (+702.06%)
Mutual labels:  wsl
Termux Archlinux
You can use setupTermuxArch.bash 📲 to install Arch Linux in Termux on Amazon, Android, Chromebook and Windows. https://sdrausty.github.io/termux-archlinux/
Stars: ✭ 384 (-1.29%)
Mutual labels:  bash-script
Rotten Scripts
Scripts that will make you go WOW 😍💻
Stars: ✭ 344 (-11.57%)
Mutual labels:  bash-script

Move WSL

Bash, batch and PowerShell script to move WSL 1 and WSL 2 distros VHDX file to a different location.

Interactive Example

Usage

Bash

Use with git bash for Windows or similiar.

Interactive way

  1. ./move-wsl
  2. Select your distro
  3. Enter your target (i.e. /d/wsl target/ubuntu)

Explicit way

  1. Get a list of WSL distros: wsl -l
  2. Move your image: ./move-wsl [NAME] [LOCATION]

Example: ./move-wsl docker-desktop /d/docker

PowerShell

Interactive way of moving wsl for Windows PowerShell.

  1. ./move-wsl.ps1
  2. Select your distro
  3. Enter your target (i.e. D:\wsl target\ubuntu)

Batch

This is a lightweight version which can also be used from Windows CMD.

  1. Get a list of WSL distros: wsl -l
  2. Move your image: move-wsl.bat [NAME] [LOCATION]

Example: move-wsl.bat docker-desktop "D:\wsl files\docker"

Moving Docker WSL

Before moving Docker WSL make sure to stop the Docker service. Otherwise Docker will crash and you may need to reset it to factory defaults.

FAQ

Default user was switched to root when moving a distro

Set your default user inside your distro by adding the following configuration to your /etc/wsl.conf.

[user]
default=YOUR_USERNAME

If the file doesn't exist create it manually. Then exit your distro, terminate it (wsl -t YOUR_DISTRO) and start it again. For further options see Microsoft Docs.

Standard distro switched when moving it

Since we need to unregister to import it with the same name, the standard distro can be switched. Just set your standard distro again:

wsl -s YOUR_DISTRO

WSL version was switched when moving distro

On import the distro will be registered with the current default WSL version. You can set your default WSL version with wsl --set-default-version <Version>. When the WSL version was accidentally changed while moving, you can set the version with wsl --set-version <Distro> <Version>.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].