{"_attachments":{},"_id":"is-wsl","_rev":"2431-61f1491eb677e08f5114725a","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","dist-tags":{"latest":"3.1.1"},"license":"MIT","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"name":"is-wsl","readme":"# is-wsl\n\n> Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows)\n\nCan be useful if you need to work around unimplemented or buggy features in WSL. Supports both WSL 1 and WSL 2.\n\n## Install\n\n```sh\nnpm install is-wsl\n```\n\n## Usage\n\n```js\nimport isWsl from 'is-wsl';\n\n// When running inside Windows Subsystem for Linux\nconsole.log(isWsl);\n//=> true\n```\n","time":{"created":"2022-01-26T13:14:06.982Z","modified":"2026-02-15T08:45:13.810Z","2.2.0":"2020-05-03T07:57:13.100Z","2.1.1":"2019-09-23T06:18:06.597Z","2.1.0":"2019-06-23T06:23:43.801Z","2.0.0":"2019-04-23T08:16:19.492Z","1.1.0":"2017-04-17T05:39:47.328Z","1.0.0":"2017-04-16T13:41:16.689Z","3.0.0":"2023-08-08T19:10:05.984Z","3.1.0":"2023-09-25T05:58:41.397Z","3.1.1":"2026-02-15T08:45:04.136Z"},"versions":{"2.2.0":{"name":"is-wsl","version":"2.2.0","description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"dependencies":{"is-docker":"^2.0.0"},"devDependencies":{"ava":"^1.4.1","clear-module":"^3.2.0","proxyquire":"^2.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"7f3df4886d5f0292bda51cf240218ea643136961","bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","_id":"is-wsl@2.2.0","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"74a4c76e77ca9fd3f932f290c17ea326cd157271","size":2011,"noattachment":false,"tarball":"https://registry.npmmirror.com/is-wsl/-/is-wsl-2.2.0.tgz","integrity":"sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-wsl_2.2.0_1588492632975_0.7188566750778995"},"_hasShrinkwrap":false,"publish_time":1588492633100,"_cnpm_publish_time":1588492633100,"_cnpmcore_publish_time":"2021-12-13T15:49:29.652Z"},"2.1.1":{"name":"is-wsl","version":"2.1.1","description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"devDependencies":{"ava":"^1.4.1","clear-module":"^3.2.0","proxyquire":"^2.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"d51f13a2064d2fc86f5efdadb25ed6427345512e","bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","_id":"is-wsl@2.1.1","_nodeVersion":"10.16.3","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"4a1c152d429df3d441669498e2486d3596ebaf1d","size":1966,"noattachment":false,"tarball":"https://registry.npmmirror.com/is-wsl/-/is-wsl-2.1.1.tgz","integrity":"sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog=="},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-wsl_2.1.1_1569219486491_0.5998381945097029"},"_hasShrinkwrap":false,"publish_time":1569219486597,"_cnpm_publish_time":1569219486597,"_cnpmcore_publish_time":"2021-12-13T15:49:29.921Z"},"2.1.0":{"name":"is-wsl","version":"2.1.0","description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"devDependencies":{"ava":"^1.4.1","clear-module":"^3.2.0","proxyquire":"^2.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"353c6b259583bbdb0942f59f6bba961dad02a590","bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","_id":"is-wsl@2.1.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"94369bbeb2249ef07b831b1b08590e686330ccbb","size":1973,"noattachment":false,"tarball":"https://registry.npmmirror.com/is-wsl/-/is-wsl-2.1.0.tgz","integrity":"sha512-pFTjpv/x5HRj8kbZ/Msxi9VrvtOMRBqaDi3OIcbwPI3OuH+r3lLxVWukLITBaOGJIbA/w2+M1eVmVa4XNQlAmQ=="},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-wsl_2.1.0_1561271023715_0.7919014380053317"},"_hasShrinkwrap":false,"publish_time":1561271023801,"_cnpm_publish_time":1561271023801,"_cnpmcore_publish_time":"2021-12-13T15:49:30.320Z"},"2.0.0":{"name":"is-wsl","version":"2.0.0","description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"devDependencies":{"ava":"^1.4.1","clear-module":"^3.2.0","proxyquire":"^2.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"259d6f980602b053133efbf03a8868be649106c9","bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","_id":"is-wsl@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"32849d5bf66413883ce07fada2e924f5505ed493","size":1740,"noattachment":false,"tarball":"https://registry.npmmirror.com/is-wsl/-/is-wsl-2.0.0.tgz","integrity":"sha512-58xqeym9YpL60zUX4GlBfSLgV0mOL5JRQ6b8HnmmD4crNxprFdL7JGuo9AgtY38+JqseeA6t+XzYCprTkD4nmg=="},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-wsl_2.0.0_1556007379399_0.8450262724840771"},"_hasShrinkwrap":false,"publish_time":1556007379492,"_cnpm_publish_time":1556007379492,"_cnpmcore_publish_time":"2021-12-13T15:49:30.653Z"},"1.1.0":{"name":"is-wsl","version":"1.1.0","description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"devDependencies":{"ava":"*","clear-require":"^2.0.0","proxyquire":"^1.7.11","xo":"*"},"gitHead":"60ea5d57a51ee596cb144ef47187c0476a5a421b","bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","_id":"is-wsl@1.1.0","_shasum":"1f16e4aa22b04d1336b66188a66af3c600c3a66d","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"1f16e4aa22b04d1336b66188a66af3c600c3a66d","size":1691,"noattachment":false,"tarball":"https://registry.npmmirror.com/is-wsl/-/is-wsl-1.1.0.tgz","integrity":"sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw=="},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-wsl-1.1.0.tgz_1492407587032_0.143065512413159"},"directories":{},"publish_time":1492407587328,"_hasShrinkwrap":false,"_cnpm_publish_time":1492407587328,"_cnpmcore_publish_time":"2021-12-13T15:49:30.996Z"},"1.0.0":{"name":"is-wsl","version":"1.0.0","description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"devDependencies":{"ava":"*","proxyquire":"^1.7.11","xo":"*"},"ava":{"require":"./pre-test"},"gitHead":"c6ca0e95be14195689497e93e4406a55b5971022","bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","_id":"is-wsl@1.0.0","_shasum":"48ad3669f346b13c36578715c4f180a6685e3dba","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"48ad3669f346b13c36578715c4f180a6685e3dba","size":1699,"noattachment":false,"tarball":"https://registry.npmmirror.com/is-wsl/-/is-wsl-1.0.0.tgz","integrity":"sha512-7GgbmRmQtf0VuhVm/jjPc/9hLo1mBfcih2d+RZZHi8BlWXnYYenxesBcir50fczgABsDXQL631D6j2bQT73xZQ=="},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-wsl-1.0.0.tgz_1492350076393_0.24916732753627002"},"directories":{},"publish_time":1492350076689,"_hasShrinkwrap":false,"_cnpm_publish_time":1492350076689,"_cnpmcore_publish_time":"2021-12-13T15:49:31.354Z"},"3.0.0":{"name":"is-wsl","version":"3.0.0","description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"dependencies":{"is-docker":"^3.0.0"},"devDependencies":{"ava":"^5.3.1","esmock":"^2.3.6","tsd":"^0.28.1","xo":"^0.55.1"},"ava":{"serial":true,"nodeArguments":["--loader=esmock","--no-warnings"]},"types":"./index.d.ts","gitHead":"dc1e34c1fa33b5ebe8daaa8cb1d9434b2c66b674","bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","_id":"is-wsl@3.0.0","_nodeVersion":"16.20.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-TQ7xXW/fTBaz/HhGSV779AC99ocpvb9qJPuPwyIea+F+Z+htcQ1wouAA0xEQaa4saVqyP8mwkoYp5efeM/4Gbg==","shasum":"8d51da05a88746f0944a44b51e5bcd0fb7eaa8b4","tarball":"https://registry.npmmirror.com/is-wsl/-/is-wsl-3.0.0.tgz","fileCount":5,"unpackedSize":3404,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAmHP+gpOEi6f1SY5PFo3P8E8GNBzInTh2VabLxrGAK0AiA6+vMOYwUNp0RN3Hwcy8JvWOzTn1XUhXxuXZLrfRbVEw=="}],"size":1802},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-wsl_3.0.0_1691521805788_0.5480564411936593"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-08T19:10:05.984Z","publish_time":1691521805984,"_source_registry_name":"default"},"3.1.0":{"name":"is-wsl","version":"3.1.0","description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"dependencies":{"is-inside-container":"^1.0.0"},"devDependencies":{"ava":"^5.3.1","esmock":"^2.3.6","tsd":"^0.28.1","xo":"^0.55.1"},"ava":{"serial":true,"nodeArguments":["--loader=esmock","--no-warnings"]},"types":"./index.d.ts","gitHead":"98dfe3e4e6c7e8c544d942bd9c81f2c7830cf221","bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","_id":"is-wsl@3.1.0","_nodeVersion":"18.17.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==","shasum":"e1c657e39c10090afcbedec61720f6b924c3cbd2","tarball":"https://registry.npmmirror.com/is-wsl/-/is-wsl-3.1.0.tgz","fileCount":5,"unpackedSize":3451,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcIbKjM6016N36d2EW/hTOJj/8WPUVrlm+ll/jgDCruAIgcuXlZu2voxdJVfuI/r+Onf/bRnRfxJNNeYEQssmqfug="}],"size":1812},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-wsl_3.1.0_1695621521171_0.36542649158871"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-25T05:58:41.397Z","publish_time":1695621521397,"_source_registry_name":"default"},"3.1.1":{"name":"is-wsl","version":"3.1.1","description":"Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"dependencies":{"is-inside-container":"^1.0.0"},"devDependencies":{"ava":"^5.3.1","esmock":"^2.3.6","tsd":"^0.28.1","xo":"^0.55.1"},"ava":{"serial":true,"nodeArguments":["--loader=esmock","--no-warnings"]},"gitHead":"d2ffb4a9844a590a53e14fb0c5e4762b3fdffaf3","types":"./index.d.ts","_id":"is-wsl@3.1.1","bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","_nodeVersion":"25.6.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==","shasum":"327897b26832a3eb117da6c27492d04ca132594f","tarball":"https://registry.npmmirror.com/is-wsl/-/is-wsl-3.1.1.tgz","fileCount":5,"unpackedSize":3664,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDVWQWWERMulhg59dny0Q089HoiA3Uz7GU6c0Fb2uYSwwIhAJSXLCkny76QKuHQ23YhhKU6L0n7IVBihdAbfIXDzanI"}],"size":1912},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-wsl_3.1.1_1771145103997_0.7733269838484698"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-15T08:45:04.136Z","publish_time":1771145104136,"_source_registry_name":"default"}},"bugs":{"url":"https://github.com/sindresorhus/is-wsl/issues"},"homepage":"https://github.com/sindresorhus/is-wsl#readme","keywords":["check","wsl","windows","subsystem","linux","detect","bash","process","console","terminal","is"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-wsl.git"},"_source_registry_name":"default"}