wsl.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 27 Jun 2020 20:52:14 +0300
changeset 2423 6a4fd5ccb340
parent 2368 574d07ac6f55
child 2457 9e6abc83e5d6
permissions -rw-r--r--
Mounting external drives.


==================================
 WSL, Windows subsystem for Linux
==================================
.. contents::
   :local:

wsl utility
===========

Run Linux command from default distro::

  wsl ls
  wsl -e /bin/ls
  wsl --exec /bin/bash

Run Linux command from specific distro::

  wsl -d ubuntu ls
  wsl -d debian -e /bin/ls
  wsl -d debian --exec /bin/bash
  wsl -distribution debian --exec /bin/bash

Run Linux command from specific user::

  wsl -u user ls
  wsl --user root ls

wslconfig utility
=================

List distros::

  wslconfig /l
  wslconfig /list

Set default distro::

  wslconfig /s debian
  wslconfig /setdefault debian

Terminate any running parts of distro::

  wslconfig /s debian
  wslconfig /terminate debian

Mounting external drives
========================

::

  sudo mkdir /mnt/f
  sudo mount -t drvfs f: /mnt/f