wsl.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Fri, 13 Nov 2020 22:27:55 +0200
changeset 2456 b7e46ea06927
parent 2423 6a4fd5ccb340
child 2457 9e6abc83e5d6
permissions -rw-r--r--
Show current key details.


==================================
 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