Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>WSL ManagerNew to Visual Studio Code? Get it now.
WSL Manager

WSL Manager

jkudo

|
1,908 installs
| (0) | Free
Manage Windows Subsystem for Linux distributions directly from VS Code — start, stop, install, remove, export, import, and more.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

WSL Manager for VS Code

Manage your Windows Subsystem for Linux distributions directly from the VS Code sidebar.

Note: This is a community-developed extension and is not affiliated with, endorsed by, or supported by Microsoft. "Windows Subsystem for Linux" and "WSL" are trademarks of Microsoft Corporation.

WSL Manager Demo

Features

Sidebar View

Click the WSL icon in the Activity Bar to see all installed distributions with their name (★ for default), state (Running / Stopped), and WSL version (1 / 2). The list refreshes automatically at a configurable interval.

Lifecycle Management

Action Description
Start Start a stopped distribution
Stop Stop a running distribution
Shutdown All Stop all running WSL instances at once

WSL Containers (Preview)

If your WSL version includes the WSL container preview feature (wslc.exe), the sidebar shows Containers and Images sections:

Action Description
Run New Container Pick an image (or enter a reference), optionally set a name and port mapping — the container starts detached
Run Interactive Container Start a new container from an image and land directly in its shell in a terminal (works even for images whose default command exits immediately)
Start / Stop Manage the container lifecycle
Open Shell Open a terminal inside a running container (bash if available, otherwise sh)
Connect VS Code Attach a VS Code window to a running container via the Dev Containers extension (pre-release version required — see Requirements)
Show Logs View recent container logs in an output channel
Remove / Prune Remove a container or all stopped containers
Image actions Run a container from an image, remove an image, prune unused images

If wslc.exe is not detected, a hint entry appears instead — WSL containers currently require the WSL pre-release channel (wsl --update --pre-release). The sections can be hidden with the wslManager.containers.enabled setting.

What "Connect VS Code" changes on your machine

Attaching VS Code to a container goes through the Dev Containers extension, so this command touches two things outside this extension. Both are disclosed here because they affect other tools:

Change Details
dev.containers.dockerPath Set to wslc.exe so Dev Containers drives WSL containers instead of Docker. Global setting — you are asked before it is changed, the previous value is remembered, and "WSL Manager: Restore Dev Containers Docker Path" puts it back. While it points at wslc, Dev Containers will not manage Docker containers.
A per-container attach config A minimal {} file is created in the Dev Containers extension's storage (nameConfigs/<container>.json) — the same file its own "Open Attach Container Configuration File" command creates. This works around a gap in wslc 2.9.4, whose inspect output omits Config.Image and makes Dev Containers fail with a TypeError. It is only created when that field is actually missing, and existing files are never overwritten.

Install with Custom Instance Name

Install new distributions from the online catalog (wsl --list --online) and assign a custom instance name. The extension automatically detects your WSL version and selects the best installation strategy:

WSL Version Strategy User Setup
2.4.4+ wsl --install --name (native) OOBE via terminal
< 2.4.4 export → import flow (legacy) useradd + chpasswd

When cloud-init or a cached image is used, the flow adapts accordingly — see sections below.

Distribution Image Cache

Caches distribution images locally after the first download to speed up repeated installs and save bandwidth.

Behavior Description
Auto-save After a fresh install, the clean image is exported and cached
Cached section Cached distros appear at the top of the install list for quick access
Stale warning Images older than the configured expiry (default: 30 days) show a ⚠️ warning
Cache or fresh When selecting a distro with cache from the Online section, choose to use cache or re-download
Per-distro clear Multi-select cached images to delete individually

Cache location: %LOCALAPPDATA%\WSLManager\cache\

cloud-init Provisioning

Supported distributions can be automatically provisioned during install using a cloud-init user-data config file (YAML). When provided, user creation, package installation, and custom setup are all handled by cloud-init — no manual OOBE or password input needed.

How it works: The extension places the YAML file at %USERPROFILE%\.cloud-init\<instanceName>.user-data before the first boot. cloud-init reads it automatically on startup.

Config Management: The sidebar includes a "Cloud-Init Configs" section where you can manage your configs:

Action Description
Import Import a YAML file as a saved config (+ button in title bar)
Edit Open config directly in VS Code (saved to storage on Ctrl+S)
Export Save config to a YAML file
Duplicate Create a copy of an existing config
Rename Change the display name
Delete Remove a config
Group Organize configs into groups with drag and drop

Two built-in sample configs are included: "Default" (common development tools) and "Docker" (Default + Docker CE). Configs are stored as YAML files in %APPDATA%\Code\User\globalStorage\jkudo.wsl-manager\cloud-init\.

When installing from cache with cloud-init, the extension automatically resets cloud-init state and runs all stages in the background — no manual terminal interaction needed.

Supported distributions:

  • AlmaLinux 8 / 9 / 10
  • Fedora Linux
  • Ubuntu 20.04 / 22.04 / 24.04 LTS
  • Oracle Linux 8 / 9
  • openSUSE Leap 15.6 / 16.0, Tumbleweed
  • SUSE Linux Enterprise 15 / 16
  • eLxr

Example cloud-init config:

#cloud-config

locale: ja_JP.UTF-8
timezone: Asia/Tokyo

users:
  - name: dev
    groups: [adm, sudo]
    sudo: ALL=(ALL) NOPASSWD:ALL
    shell: /bin/bash

write_files:
  - path: /etc/wsl.conf
    append: true
    content: |
      [user]
      default=dev

packages:
  - git
  - curl
  - build-essential

runcmd:
  - sudo -u dev git config --global init.defaultBranch main

cgroup v1 Management

Automatically adds kernelCommandLine = cgroup_no_v1=all to .wslconfig on every install. This can be changed in WSL Settings under the Kernel section.

WSL Settings Editor

A VS Code-style settings GUI for .wslconfig. Open from the … menu → WSL Settings.

Category Settings
Memory & CPU Memory, Processors, Swap, Swap File Path
Networking Networking Mode (NAT/Mirrored), DNS Tunneling, DNS Proxy, Firewall, Auto Proxy, Localhost Forwarding
Virtualization Nested Virtualization, GUI Applications (WSLg), VM Idle Timeout
Disk Sparse VHD
Kernel Custom Kernel, Kernel Command Line
Experimental Auto Memory Reclaim, Host Address Loopback

Grouping

Organize distributions into custom groups displayed as folders in the sidebar. Drag and drop to move distributions between groups or reorder them.

Action Description
Create Group Add a new group (from title bar or Command Palette)
Rename Group Rename a group (right-click on group)
Delete Group Remove a group; its distributions move to the default group
Drag & Drop Move distributions between groups or reorder groups/distributions

A default group ("General") always exists and cannot be deleted. New distributions are assigned to a group during the install wizard. If only one group exists, assignment is automatic.

Distribution Management

Action Description
Remove Unregister a distribution with double confirmation (type the name to confirm; can be relaxed with wslManager.confirmBeforeRemove)
Remove Multiple Bulk-remove selected distributions (from … menu or Command Palette)
Set as Default Change the default WSL distribution
Convert WSL Version Switch a distribution between WSL 1 and WSL 2

Backup, Restore & Clone

Action Description
Export Export a distribution to tar or VHDX format
Import Import a distribution from a tar or VHDX file
Clone Duplicate an existing distribution with optional user configuration

Development Tools

Action Description
Open Terminal Launch the distribution in the VS Code integrated terminal (opens in home directory)
Connect to WSL Open a VS Code window connected to the distribution via the WSL remote extension
WSL Settings Visual settings editor for .wslconfig
Edit wsl.conf Edit per-distribution settings in a local copy; saving writes it back to /etc/wsl.conf as root and offers to restart the distribution. Works when the default user is not root, and independently of the automount/interop settings that wsl.conf itself controls

If you disable [interop] or [automount] in wsl.conf: the WSL remote extension normally starts its server through a script that depends on those features, so Connect to WSL can stop working after the distribution restarts. The fix is the WSL extension's scriptless startup mode — add "remote.WSL.experimental.scriptLessStartup": true to your VS Code settings (Settings → search "scriptless"). "Edit wsl.conf" itself is not affected: it writes over stdin precisely so you can always edit the settings back.

Usage

From the Sidebar

  1. Click the WSL icon in the Activity Bar
  2. Right-click a distribution to open the context menu
  3. Hover over a distribution to reveal inline action buttons (terminal, start/stop)

From the Command Palette

Ctrl+Shift+P → type WSL Manager: to see all available commands.

Install Wizard Flow

Step 1: Select distribution (Cached / Online)
Step 2: Enter custom instance name
Step 3: Select group (if multiple groups exist)
Step 4: Select cloud-init config (saved configs / file / skip)
Step 5: Cache/fresh choice or install directory (if applicable)
Step 6: Username + password (only when no cloud-init and no OOBE)
  ↓
Install → Configure .wslconfig → User setup or cloud-init → Ready

Settings

Setting Default Description
wslManager.autoRefreshInterval 30 Auto-refresh interval in seconds (5–300)
wslManager.confirmBeforeRemove true Require double confirmation before removing a distribution
wslManager.defaultExportFormat tar Default export format (tar or vhdx)
wslManager.showInlineActions true Show inline action buttons in the tree view
wslManager.cache.enabled true Cache distribution images locally
wslManager.cache.expiryDays 30 Days before a cached image is considered stale (1–365)
wslManager.containers.enabled true Show the Containers and Images sections (requires wslc)
wslManager.containers.wslcPath "" Override the path to wslc.exe (advanced; empty = auto-detect)

Requirements

  • Windows 10 (21H2+) or Windows 11
  • WSL installed and enabled
  • VS Code 1.85.0 or later

The container features are optional and detected at runtime — without them the extension works exactly as before:

Feature Additional requirement
Containers / Images sections A WSL version that ships wslc.exe (WSL container is in public preview: wsl --update --pre-release)
Connect VS Code to Container The Dev Containers extension, pre-release version (it is the version that recognizes wslc as a container runtime)

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft