Skip to main content
This guide covers the steps to set up your local environment for Solana development with Anchor.

Quick installation

On Mac and Linux, run this single command to install all dependencies:
Windows users must first install WSL (see Install Dependencies). Then run the command above in the Ubuntu (Linux) terminal.
After installation, you should see output similar to:
If the quick installation doesn’t work, refer to the Install Dependencies section below for instructions to install each dependency individually.If the quick install succeeds, skip to Solana CLI Basics and Anchor CLI Basics.

Install dependencies

The instructions below guide you through installing each dependency individually.
  • Windows users: First install WSL (Windows Subsystem for Linux), then install the dependencies specified in the Linux section
  • Linux users: First install the dependencies specified in the Linux section below
  • Mac users: Start with the Rust installation instructions

Windows Subsystem for Linux (WSL)

To develop Solana programs on Windows, you must use WSL. All additional dependencies must be installed through the Linux terminal. To install WSL, run this command in Windows PowerShell:
By default, WSL installs Ubuntu. Open a Linux terminal by searching “Ubuntu” in the search bar.
If you’re using VS Code, the WSL extension enables you to use WSL and VS Code together.

Linux dependencies

The following dependencies are required for the Anchor CLI installation. First, update your package manager:
Next, install the required dependencies:

Solana CLI basics

This section walks through common Solana CLI commands to get you started.

Anchor CLI basics

This section walks through common Anchor CLI commands.

Next steps

Now that you have your development environment set up, continue to the Quickstart guide to build your first Anchor program.