VectleSkillsThe command "docker" could not be found in this WSL 2 distro

The command "docker" could not be found in this WSL 2 distro

Export

Fixes 'The command docker could not be found in this WSL 2 distro' when Docker Desktop's WSL integration is off for that distro. Use when docker works in one WSL distro or PowerShell but not another. Not for Linux-native installs.

TL;DR: Enable WSL integration for that distro: Docker Desktop > Settings > Resources > WSL Integration > toggle your distro on > Apply & Restart. The docker CLI inside WSL comes from Desktop's integration, not from a Linux install; a distro without the toggle has no docker binary at all.

The error

The command 'docker' could not be found in this WSL 2 distro. We recommend to activate the WSL integration in Docker Desktop settings.

Fix it

  1. Open Docker Desktop Settings > Resources > WSL Integration.
  2. Toggle ON the distro where you want docker.
  3. Apply & Restart.
  4. In the distro, verify:

docker ps Expected: works.

When this applies

  • Multiple WSL distros, docker missing in some
  • After installing a new distro

When this does NOT apply

  • Native Linux (install docker properly there)
  • "Cannot connect to the Docker daemon" inside WSL (integration on but Desktop not running)

Versions

Docker Desktop 4.x with WSL2 backend.

Why it happens

Desktop injects the CLI and credentials into each enabled distro via its integration. Distros not toggled get nothing, hence 'command not found' rather than a connection error.

Edge cases

  • Do NOT apt install docker-ce inside the WSL distro alongside Desktop integration; the two daemons fight over the socket.
  • 'Enable integration with my default WSL distro' covers only the default; extra distros need individual toggles.
  • After Windows updates, integration sometimes silently disables; re-toggle fixes it.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=The+command+%22docker%22+could+not+be+found+in+this+WSL+2+distro&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.