[DISCUSSION] Windows Subsystem for Linux (WSL)

Discussion in 'Windows 10' started by Tito, Jul 30, 2016.

  1. kibkalo

    kibkalo MDL Expert

    Sep 8, 2009
    1,025
    362
    60
    Where can I find information on how to export pre-configured WSL2 from one PC to another?
    Inside AppX there is a big ext4.vhdx, but repacking appx breaks certain update logic.
    Is there a way to have original AppX + import previously exported configuration some way?
    Or we may need some cloud sync?

    Thanks
     
  2. DougQuaid

    DougQuaid MDL Junior Member

    Aug 15, 2012
    56
    86
    0
    wsl --help
    Code:
    Arguments for managing distributions in Windows Subsystem for Linux:
    
        --export <Distro> <FileName> [Options]
            Exports the distribution to a tar file.
            The filename can be - for stdout.
    
            Options:
                --vhd
                    Specifies that the distribution should be exported as a .vhdx file.
    
        --import <Distro> <InstallLocation> <FileName> [Options]
            Imports the specified tar file as a new distribution.
            The filename can be - for stdin.
    
            Options:
                --version <Version>
                    Specifies the version to use for the new distribution.
    
                --vhd
                    Specifies that the provided file is a .vhdx file, not a tar file.
                    This operation makes a copy of the .vhdx file at the specified install location.
    
        --import-in-place <Distro> <FileName>
            Imports the specified .vhdx file as a new distribution.
            This virtual hard disk must be formatted with the ext4 filesystem type.
    or what do you want to export?
    wsl configuration is stored in %userprofile%\.wslconfig
     
  3. LevT

    LevT MDL Novice

    Dec 2, 2008
    19
    0
    0
    #283 LevT, Aug 21, 2024
    Last edited: Aug 21, 2024
    Sorry, it is my question too.

    Consider, for example, redirected personal folders. Backupping and restoring them when I switch between systems is a bad idea.

    I want, firstly, to move my distros from windows boot volumes, to free a lot of space,
    and, secondly, to easily detach and attach them between my vhdx-bootable systems.

    I could write some custom scripts, still asking for a "standard" solution.
     
  4. LevT

    LevT MDL Novice

    Dec 2, 2008
    19
    0
    0
    --import-in-place <Distro> <FileName>
    Imports the specified .vhdx file as a new distribution.
    This virtual hard disk must be formatted with the ext4 filesystem type.


    - seems like a solution, just a bit contra intuitive and maybe suboptimal. I can't figure out the consequences of such kind of sharing.
     
  5. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,808
    18,991
    340