wsl.rst
changeset 2535 6f7f3c2f40e1
parent 2534 f63a05c1ce4f
child 2536 4b67faf58c4b
equal deleted inserted replaced
2534:f63a05c1ce4f 2535:6f7f3c2f40e1
    47   wsl -u root -e sh -c "service apache status || service apache start"
    47   wsl -u root -e sh -c "service apache status || service apache start"
    48 
    48 
    49 https://docs.microsoft.com/en-us/windows/wsl/wsl-config
    49 https://docs.microsoft.com/en-us/windows/wsl/wsl-config
    50   Ways to run WSL.
    50   Ways to run WSL.
    51 
    51 
       
    52 .. note:: Earlier ``wsl`` utility was limited and some job performed by ``wslconfig`` utility:
       
    53 
       
    54    * List distros::
       
    55 
       
    56      wslconfig /l
       
    57      wslconfig /list
       
    58 
       
    59    * Set default distro::
       
    60 
       
    61      wslconfig /s debian
       
    62      wslconfig /setdefault debian
       
    63 
       
    64    * Terminate any running parts of distro::
       
    65 
       
    66      wslconfig /t debian
       
    67      wslconfig /terminate debian
       
    68 
    52 Installing WSL distor second time
    69 Installing WSL distor second time
    53 =================================
    70 =================================
    54 
    71 
    55 Microsoft provides certain Linux distros out of the box::
    72 Microsoft provides certain Linux distros out of the box::
    56 
    73 
    95 
   112 
    96 You download rootfs and import it::
   113 You download rootfs and import it::
    97 
   114 
    98   wget http://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04-base-amd64.tar.gz
   115   wget http://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04-base-amd64.tar.gz
    99   wsl --import my-ubuntu c:\wsl\my-ubuntu ubuntu-base-22.04-base-amd64.tar.gz --version 2
   116   wsl --import my-ubuntu c:\wsl\my-ubuntu ubuntu-base-22.04-base-amd64.tar.gz --version 2
   100 
       
   101 wslconfig utility
       
   102 =================
       
   103 
       
   104 List distros::
       
   105 
       
   106   wslconfig /l
       
   107   wslconfig /list
       
   108 
       
   109 Set default distro::
       
   110 
       
   111   wslconfig /s debian
       
   112   wslconfig /setdefault debian
       
   113 
       
   114 Terminate any running parts of distro::
       
   115 
       
   116   wslconfig /t debian
       
   117   wslconfig /terminate debian
       
   118 
   117 
   119 Mounting Windows file systems
   118 Mounting Windows file systems
   120 =============================
   119 =============================
   121 
   120 
   122 From January 2018 WSL 1 allows to mount external NTFS file systems as ``drvfs``. ``metadata`` option
   121 From January 2018 WSL 1 allows to mount external NTFS file systems as ``drvfs``. ``metadata`` option