is-wsl is a small Node.js package that checks whether the current process is running inside Windows Subsystem for Linux (WSL), including both WSL 1 and WSL 2. It is useful for detecting a WSL environment and applying workarounds for unimplemented or buggy features.
Project status
- Actively maintained, with a recent update on 2026-02-15 and a fix in v3.1.1 that improves WSL detection for custom kernels.
- Apparent cadence is low frequency, with only v3.1.1 in 2026 and the prior major/minor updates in 2023 (v3.1.0 and v3.0.0).
AI summary generated Today
Recent updates
v3.1.1
3 months agov3.1.1 improves detection of Windows Subsystem for Linux when running with custom kernels. The code now falls back to checking WSL-specific filesystem paths if /proc/version does not contain the expected 'microsoft' marker.
v3.1.0
9/25/2023v3.1.0 updates the library to improve container detection for WSL environments, with release notes mentioning Podman support. The code changes replace the previous Docker-specific check with a more general inside-container check.
Featuresv3.0.0
8/8/2023v3.0.0 modernizes is-wsl by switching the package to pure ESM and raising the minimum supported Node.js version to 16. The runtime logic remains the same (detect WSL by checking /proc/version and excluding Docker), but module format and TypeScript typings change to match the new export style.
Breakingv2.2.0
5/3/2020Release v2.2.0 adds detection to ensure the module does not report WSL when the code is running inside Docker within a WSL environment. It does this by integrating a Docker detection dependency and adding a corresponding test case.
BreakingFeaturesv2.1.1
9/23/2019Release v2.1.1 provides a targeted fix for incorrect return behavior when running on Linux that is not Windows Subsystem for Linux. The main functional change ensures the exported check returns an actual boolean false instead of potentially returning undefined.
v2.1.0
6/23/2019v2.1.0 adds detection support for Windows Subsystem for Linux (WSL) 2. The implementation updates the WSL detection logic and extends the test suite to cover both WSL 1 and WSL 2.
Featuresv2.0.0
4/23/2019v2.0.0 introduces TypeScript type definitions for the package. It also includes a breaking requirement to run on Node.js 8.
BreakingFeatures