Need help with is-wsl?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

sindresorhus
144 Stars 4 Forks MIT License 17 Commits 0 Opened issues

Description

Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)

Services available

!
?

Need anything else?

Contributors list

# 204
node
exec
test-fr...
nextjs
12 commits
# 4
Angular
React N...
Swift
Android
1 commit
# 32,180
webfram...
exec
Babel
test-fr...
1 commit
# 7,443
TypeScr...
typescr...
iterm2
Node.js
1 commit
# 571,420
TypeScr...
JavaScr...
Shell
1 commit
# 412,949
TypeScr...
HTML
cqrs
Redux
1 commit

is-wsl

Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)

Can be useful if you need to work around unimplemented or buggy features in WSL. Supports both WSL 1 and WSL 2.

Install

$ npm install is-wsl

Usage

const isWsl = require('is-wsl');

// When running inside Windows Subsystem for Linux console.log(isWsl); //=> true


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.