Install OpenCode inside WSL when your repository and shell tools already live there. A native Windows installation and a WSL installation are separate, even on the same computer.
Install inside WSL
Open your Linux distribution and follow the current command on the OpenCode documentation site. Run the installer inside WSL, then open a new shell and confirm that OpenCode starts:
opencode --version
Use the current official installation method. Package names and installers can change between releases.
Keep the project in Linux
Create or clone the repository under your Linux home:
mkdir -p ~/projects
cd ~/projects
git clone https://example.com/your/repository.git
cd repository
opencode
Replace the example repository URL. Use /mnt/c only when Windows software needs direct access to the same files.
Connect a provider
Inside OpenCode, run:
/connect
Select the provider and enter its API key. Then choose a model:
/models
Built-in provider entries are the normal setup. For example, current OpenCode releases list DeepSeek directly, so a hand-written DeepSeek provider block is unnecessary.
Test the installation
Start with a read-only request such as listing files or summarizing a short document. Confirm the selected provider and model before allowing edits or commands.
Common problems
opencodeis missing: install it inside the current WSL distribution and open a new shell.- A provider is missing: update OpenCode, restart it, and check
/connectagain. - A model is missing: run
/modelsand use the exact current model entry. - File operations are slow: move the active repository from
/mnt/cto the Linux home. - The Windows and WSL sessions differ: reconnect the provider in the environment you are using.
OpenCode in WSL checklist
- OpenCode installed inside WSL
- Repository kept in Linux when practical
- Provider connected with /connect
- Model selected with /models
- Read-only request tested before edits