WebStorm 2026.3 Help

WSL

WSL (WSL 2) – Windows Subsystem for Linux – is a compatibility layer for running Linux binary executables natively on Windows 10 and later. Currently, it supports several Linux distributions, such as Ubuntu, OpenSUSE, and SLES.

With WSL toolchain set up for your project, you can build using a toolchain from Linux, and run/debug on WSL, without leaving WebStorm running on your Windows machine.

Configure WSL

  1. Download and install a WSL distribution (for instance, Ubuntu) from Microsoft Store on your Windows machine.

    For this step, be sure to use at least Windows 10 or later with the latest “Fall Creators Update” (minimum version 1709, build 16299.15). See the official guide Install the Windows Subsystem for Linux for instructions.

    To work with WSL 2, your Windows version should be 10 build 18917 or later. Follow these instructions to switch the distributive.

  2. Run the Linux distribution.

    Upon the first launch, the system may prompt you to enable the Windows optional feature. In this case, you need to do the following:

    • Open Windows PowerShell as Administrator and run

      Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    • Restart your computer.

Install Node.js and npm

Inside the Linux (Ubuntu) installation, make sure nvm, Node,js, and npm are installed. For the detailed installation instructions, refer to Install Node.js on Windows Subsystem for Linux.

  1. Open your command-line shell or the embedded Terminal (Alt+F12) .

  2. Install cURL:

    sudo apt-get install curl
  3. Install nvm:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
  4. Install Node.js by running one of the following commands:

    • nvm install --lts to install the stable Long Term Service Node.js version

    • nvm install node to install or the current release version

You can create a project and store it in the WSL environment, open one from the WSL file system, and develop your projects further in WSL.

Create a new project in the WSL file system

  1. Install and run WebStorm locally on Windows as you normally would.

  2. On the welcome screen, click New Project.

    Create a project in WSL: Welcome screen
  3. In the dialog that opens:

    1. Select the project type from the list in the left pane.

    2. In the right pane, specify the project name and location. The project location for WSL will show the absolute path starting with \\wsl$ to the WSL file system.

      Select project location in WSL
    3. Most often, WebStorm asks you to specify the location of Node.js. Select Download from the list if you have no Node.js yet. Alternatively, select Add to configure a WSL Node.js interpreter.

      Specify Node.js

      Then select Add WSL from the popup.

      Configure WSL Node.js runtime: select Add WSL

      In the Add WSL Node Runtime dialog that opens, specify the currently used Linux distribution and the path to Node.js.

      Add WSL Node.js runtime dialog
    4. Fill in the other fields in the right pane. The set of the fields depends on the selected project type. See the corresponding articles under Other languages and frameworks for details.

  4. Click Create.

    Create a project in WSL

    WebStorm creates a project located in WSL, and you can develop and build your project inside the WSL environment without leaving the IDE.

Open a project stored in the WSL file system

In WebStorm, you can directly open a project stored in the WSL file system and work with it like with any other project.

  1. Click Open on the Welcome screen or select File | Open from the main menu.

  2. In the Select Path dialog that opens, select the folder in the WSL file system that contains the project to open, or type the path to the project location manually.

    The path syntax is \\wsl.localhost\DistributionName where DistributionName is the name of your Linux distribution such as Ubuntu, Debian, Arch, and so on.

    Opening a project stored in the WSL file system

Configure the project location

You can ensure that any project you create or open uses the appropriate WSL location.

  1. Press Ctrl+Alt+S to open settings and then select Appearance & Behavior | System Settings.

  2. Under the Project section, in the Default project directory field, specify the appropriate WSL directory and click OK to save the changes.

    Default project directory

    From now on, whenever you create, open, or clone a project, the specified directory is selected by default.

Configure a WSL-based Node.js runtime

You can set a Node.js installation as the default runtime for the current project, or you can configure and use this Node.js version in a Node.js Run/Debug configuration.

  1. In the Settings dialog (Ctrl+Alt+S) , go to Languages & Frameworks | JavaScript Runtime>.

  2. Click the Browse button next to the Node runtime field, in the Node.js Runtimes dialog that opens, click the Add button, and then select Add WSL from the list.

    Configure WSL Node.js runtime: add WSL
  3. In the Add WSL Node Runtime dialog that opens, select the Linux distribution you’re using and specify the path to Node.js.

    Configuring Node.js on WSL as the default project Node.js runtime

    The configured Node.js installation is added to the list and is set as the default for the current project.

    The newly configured Node.js runtime is added to the list and set as default for the current project

Run and debug your project

When you run or debug your application, it is run in WSL. If you open the run configuration, note that WebStorm refers to WSL as local machine.

  1. Create a run/debug configuration of the appropriate type, depending on the type of your application. To do that, go to Run | Edit Configurations. Then in the Run/Debug Configurations dialog, click on the toolbar and select the required run/debug configuration type. In the dialog that opens, fill in the fields as necessary or accept the predefined values.

    Run and debug applications in WSL: create a run/debug configuration
  2. To run your application, from the Run widget select the newly created run/debug configuration, and click the Run button next to it.

  3. To debug your application, set the breakpoints where necessary, from the Run widget select the newly created run/debug configuration, and click the Debug button next to it.

    Debug applications in WSL: start a debugging session

WSLg

WSLg lets you run Linux GUI applications and shows their output on the Windows desktop.

We do not recommend running WebStorm through WSLg. WebStorm already provides native WSL integration, which is the preferred approach.

Keep in mind the following:

  • WSLg has limitations related to rendering, popups, window management, input methods, and desktop integration.

  • We do not provide dedicated support, installation guidance, onboarding, or product-specific fixes for running WebStorm through WSLg.

To learn how to open a project, refer to Open a project stored in the WSL file system or if you want to create the new one, refer to Create a new project in the WSL file system.

Tips and tricks

Using WSL as part of your everyday development workflow involves several important choices that can affect performance, compatibility, and ease of use.

Choose the file system

When creating a project on Windows with WSL, the choice is essentially between storing the project on the Windows file system (for example, in C:\Users\...\project) and storing it inside the WSL/Linux file system (for example, in ~/projects/project). The best choice depends mainly on where your development tools and runtime execute.

Choose the Windows file system (C:\Users\me\project) when most of your development environment runs natively on Windows, that is, when you use:

  • Windows Node.js and npm/yarn/pnpm

  • Windows Git

  • Windows-based terminal

  • Windows Docker tooling that works with Windows paths

  • Other Windows applications that need frequent direct access to your project files

The main advantage is that Windows applications get normal, fast access to your project files.

The downside appears when you run Linux tools against those files from WSL. The files are exposed under paths such as /mnt/c/Users/me/projects/my-app. File operations across this Windows/Linux boundary can be slower, particularly for web projects that contain huge numbers of small files, such as node_modules. File watching can also be more troublesome.

Choose the WSL file system (/home/me/projects/my-app or simply ~/projects/my-app) when your application's runtime and development toolchain run primarily on WSL. For example:

The major advantage of this approach is that Linux tools access a native Linux file system. The major advantage of this approach is that Linux tools access a native Linux file system. Operations that involve thousands of files, for example, dependency installation, indexing, compilation, tests, and file watching, generally behave more naturally there.

It also makes your development environment closer to the Linux environments that are commonly used in Continuous Integration and production.

Choose how WebStorm accesses files

If your project files are stored on the WSL file system, you need to choose how WebStorm accesses those files and where its backend runs.

WebStorm is installed on Windows and accesses files on WSL.

This configuration makes most sense when desktop convenience matters more than having the entire development stack execute inside Linux.

The main advantage is that you retain a normal Windows desktop application: Windows shortcuts, window management, browser integration, credential stores, fonts, and other desktop integrations continue to behave naturally.

The disadvantage is that WebStorm and project are on opposite sides of the Windows/Linux boundary. Depending on the WebStorm architecture, operations such as indexing, file watching, Git operations, and resolving large dependency trees can involve cross-system file access.

WebStorm is installed on Windows and accesses files on WSL in the Remote Development mode.

For a strongly WSL-oriented web development workflow, storing the project on WSL and using WebStorm with a remote backend on WSL is generally the most architecturally consistent choice.

The main advantage is Linux-native development. This is particularly attractive for a WSL-centric workflow because the computationally intensive project operations happen inside WSL, close to the files. For example, the IDE backend can index ~/projects/my-app while while Node.js, npm, Git, TypeScript, ESLint, and other tools also execute on WSL.

You get two benefits at once: a native Windows UI and a Linux-native project environment. This becomes especially valuable for projects whose tooling assumes Linux semantics, uses Linux shell scripts, relies heavily on symlinks or permissions, or has a large node_modules tree.

The Linux version of WebStorm accesses files on WSL. The WebStorm GUI is displayed through WSLg.

Although this approach seems beneficial because everything runs in the same Linux environment, a Linux version of WebStorm running through WSL is still a Linux GUI application rather than a native Windows application. As a result, integration with Windows applications, browsers, credential managers, notifications, file dialogs, and similar desktop facilities may therefore be less seamless.

Address hot reload and other read/write issues

If you keep the project on the Windows file system but run the development server or tooling inside WSL, hot reload and some read/write operations can become less reliable, because Linux processes are watching files through the Windows-mounted path, typically:

/mnt/c/...

It is strongly recommended that you avoid this cross-filesystem setup for build systems, node_modules, and Git-heavy workflows because of the extra Input/Output overhead.

For hot reload specifically, the usual workaround is to switch the file watcher from native events to polling, which means that the development server periodically checks files, for example, their modification timestamps, to see whether they have changed.

  • Vite

    When Vite runs on WSL2 and files are edited by a Windows process, file watching may not work, and usePolling: true is the fallback. The trade-off is higher CPU usage.

    export default defineConfig({ server: { watch: { usePolling: true, }, }, })
  • webpack

    Use a polling-based watch configuration:

    module.exports = { watchOptions: { poll: 1000, // Check for changes every second }, };
  • watchpack

    Use polling with a default or a specific interval.

    const wp = new Watchpack({ poll: true // Check for changes at a default interval });

    or:

    const wp = new Watchpack({ poll: 1000 });
  • chokidar

    import chokidar from 'chokidar'; const watcher = chokidar.watch('.', { usePolling: true });

For other read/write problems, the important measures are to keep the environment as consistent as possible. If the project stays on C:\..., use /mnt/c/... from WSL, avoid mixing Windows and Linux versions of package managers against the same node_modules, and be careful with permissions, case sensitivity, symlinks, and executable bits. WSL maps Windows files through DrvFS, and Linux permissions on those files do not behave exactly like permissions on a native Linux filesystem; WSL can optionally store Linux permission metadata on Windows files.

Example: Run a Vite dev server with polling enabled

  1. Create a Vite project on the Windows file system at C:\projects\my-app.

  2. Make sure your project package.json contains a script to start the Vite development server:

    { "scripts": { "dev": "vite" } }
  3. Run the development server from WSL.

    WSL sees the project as /mnt/c/projects/my-app.

  4. In vite.config.ts, enable polling:

    import { defineConfig } from 'vite' export default defineConfig({ server: { watch: { usePolling: true, }, }, })
  5. From a WSL terminal, navigate to the project and start Vite:

    cd /mnt/c/projects/my-app npm install npm run dev
  6. Vite starts the development server, typically at http://localhost:5173/

  7. Edit your application code, for example, src/App.tsx in WebStorm on Windows. Because polling is enabled in the configuration file (usePolling: true), Vite that is running on WSL periodically checks the project files for changes instead of relying solely on file-system change events. When Vite detects a modification, it triggers HMR (Hot Module Replacement) or reloads the page as appropriate.

03 November 2026