UNPKG

435 BMarkdownView Raw
1# is-wsl
2
3> Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows)
4
5Can be useful if you need to work around unimplemented or buggy features in WSL. Supports both WSL 1 and WSL 2.
6
7## Install
8
9```sh
10npm install is-wsl
11```
12
13## Usage
14
15```js
16import isWsl from 'is-wsl';
17
18// When running inside Windows Subsystem for Linux
19console.log(isWsl);
20//=> true
21```