wsl.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 16 Sep 2019 22:13:19 +0300
changeset 2376 20b65f046002
parent 2368 574d07ac6f55
child 2423 6a4fd5ccb340
permissions -rw-r--r--
Revoke privileges and drop role.


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