Windows Subsystem For Linux (WSL): Unterschied zwischen den Versionen

Aus MattWiki
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
== Basic Commands ==
== Basic Commands ==
  wsl --list  
  wsl --list or wsl -v
  wsl --list -v                   # Show running status
  wsl -l -v                       # Show running status
  wsl -d <distro>                  # Run specific distribution
  wsl -d <distro>                  # Run specific distribution
  wsl -u <username>                # Run image with specific  
  wsl -u <username>                # Run image with specific  
  wsl -u root                      # Run image as root
  wsl -u root                      # Run image as root
== Uninstall ==
wsl --unregister <distro>
Hint: This unregisters the distribution from WLS and also removes most of the files from the disk (see disk locations below)


== Clone Image ==
== Clone Image ==
  wsl --export <distro> <filename.tar.gz>
  wsl --export <distro> <filename.tar.gz>
  wsl --import <new-distro-name> <distrolocation> <filename.tar.gz>
  wsl --import <new-distro-name> <distrolocation> <filename.tar.gz>
Remarks:


= Disk Location of Distributions =
Location of distros is  
Location of distros is  
  %LOCALAPPDATA%\packages\<subfolder-for-distro>
  %LOCALAPPDATA%\packages\<subfolder-for-distro>

Version vom 7. Dezember 2023, 17:35 Uhr

Basic Commands

wsl --list or wsl -v
wsl -l -v                        # Show running status
wsl -d <distro>                  # Run specific distribution
wsl -u <username>                # Run image with specific 
wsl -u root                      # Run image as root

Uninstall

wsl --unregister <distro>

Hint: This unregisters the distribution from WLS and also removes most of the files from the disk (see disk locations below)

Clone Image

wsl --export <distro> <filename.tar.gz>
wsl --import <new-distro-name> <distrolocation> <filename.tar.gz>

Disk Location of Distributions

Location of distros is

%LOCALAPPDATA%\packages\<subfolder-for-distro>

or

C:\Users\<username>\AppData\Local\packages\<subfolder-for-distro>