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 |
|
5 | Can 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
|
10 | npm install is-wsl
|
11 | ```
|
12 |
|
13 | ## Usage
|
14 |
|
15 | ```js
|
16 | import isWsl from 'is-wsl';
|
17 |
|
18 | // When running inside Windows Subsystem for Linux
|
19 | console.log(isWsl);
|
20 | //=> true
|
21 | ```
|