wsl.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 16 Jan 2020 13:42:03 +0200
changeset 2403 f5347f511cb3
parent 2368 574d07ac6f55
child 2423 6a4fd5ccb340
permissions -rw-r--r--
To search for string in commit messages.


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