---
title: Local Installation
seoTitle: Install the Solana CLI and Anchor with one command
description:
  A quick installation guide that allows you to set up your local Solana
  development environment with a single command. Install Rust, the Solana CLI,
  and Anchor Framework on Windows (WSL), Linux, and Mac.
---

Set up your local Solana development environment with one command. This installs
Rust, the Solana CLI, Anchor Framework, Surfpool, Node.js, and Yarn on Windows
(WSL), Linux, and Mac.

## Prerequisites

<Accordions>
<Accordion title="Windows">

To develop Solana programs on Windows you **must** use
[Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/install)
(WSL). After installing WSL, all other dependencies will be installed through
the Linux terminal.

To install WSL, run the following command in Windows PowerShell:

```terminal
$ wsl --install
```

The installation process will prompt you to create a default user account.

![WSL Install](/assets/docs/intro/installation/wsl-install.png)

By default, WSL installs Ubuntu. You can open a Linux terminal by searching
"Ubuntu" in the Search bar.

![WSL Ubuntu](/assets/docs/intro/installation/wsl-ubuntu-search.png)

If your Ubuntu terminal looks like the image below, you may encounter an issue
where `ctrl + v` (paste keyboard shortcut) doesn't work in the terminal.

![Ubuntu Terminal](/assets/docs/intro/installation/wsl-ubuntu-terminal-1.png)

If you encounter this issue, open Windows Terminal by searching for "Terminal"
in the Search bar.

![Windows Terminal](/assets/docs/intro/installation/wsl-windows-terminal.png)

Next, close the Windows Terminal and reopen a Linux terminal by searching for
Ubuntu again. The terminal should now look like the image below, where
`ctrl + v` (paste keyboard shortcut) works.

![Ubuntu Terminal](/assets/docs/intro/installation/wsl-ubuntu-terminal-2.png)

If you use VS Code, the
[WSL extension](https://code.visualstudio.com/docs/remote/wsl-tutorial) enables
you to use WSL and VS Code together.

![WSL Setup in VS Code](/assets/docs/intro/installation/wsl-vscode.png)

You will see the following in the VS Code status bar:

![WSL: Ubuntu](/assets/docs/intro/installation/wsl-vscode-ubuntu.png)

Once you have WSL set up, you are ready to either:

- Complete the [quick installation](#installation) using the Ubuntu (Linux)
  terminal
- Install [Rust](/docs/intro/installation/dependencies#install-rust), the
  [Solana CLI](/docs/intro/installation/dependencies#install-solana-cli), and
  the [Anchor CLI](/docs/intro/installation/dependencies#install-anchor-cli)
  individually, as described below

</Accordion>
<Accordion title="Linux">

<Tabs items={[".deb", ".rpm"]}>
<Tab value=".deb" >
If on Debian or Debian-derived alternatives like Ubuntu or Mint, follow the steps below:

1. Update the package lists to ensure all the packages are up-to-date:

```terminal
$ sudo apt-get update
```

2. Install the following dependencies:

```terminal
$ sudo apt-get install -y \
    build-essential \
    pkg-config \
    libudev-dev llvm libclang-dev \
    protobuf-compiler libssl-dev
```

<Callout>
If you encounter the following error when installing `protobuf-compiler`, make
sure you first run _shell`sudo apt-get update`

```
Package protobuf-compiler is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
```

</Callout>

  </Tab>

    <Tab value=".rpm" >
    For RHEL derivatives like Fedora or Red Hat Linux, follow the following steps.

Update the package lists to get the newer versions of packages by running the
command.

```terminal
$ sudo dnf upgrade --refresh
```

Next, install the following dependencies:

```terminal
$ sudo dnf group install c-development development-tools \
&& sudo dnf install pkg-config openssl-devel
```

  </Tab>
</Tabs>

</Accordion>
</Accordions>

## Installation

1. Enter the following command into your terminal to install all the necessary
   dependencies:

```terminal
$ curl --proto '=https' --tlsv1.2 -sSfL https://solana-install.solana.workers.dev | bash
```

A successful installation will return output like the following:

```txt title="Example output"
Installed Versions:
Rust: rustc 1.91.1 (ed61e7d7e 2025-11-07)
Solana CLI: solana-cli 3.0.10 (src:96c3a851; feat:3604001754, client:Agave)
Anchor CLI: anchor-cli 0.32.1
Surfpool CLI: surfpool 0.12.0
Node.js: v24.10.0
Yarn: 1.22.1
```

2. Verify a successful installation by checking the version of each installed
   dependency.

```terminal
$ rustc --version && solana --version && anchor --version && surfpool --version && node --version && yarn --version
```

<Callout>
  If the installation command fails, [install each dependency
  individually](/docs/intro/installation/dependencies).
</Callout>

## Local development resources

<Cards>
  <Card
    title="Install Dependencies"
    href="/docs/intro/installation/dependencies"
  >
    Install each tool individually or troubleshoot the one-command installer.
  </Card>
  <Card
    title="Solana CLI Basics"
    href="/docs/intro/installation/solana-cli-basics"
  >
    Configure clusters, manage keypairs, and use common Solana CLI commands.
  </Card>
  <Card
    title="Anchor CLI Basics"
    href="/docs/intro/installation/anchor-cli-basics"
  >
    Create, build, test, and deploy Anchor projects.
  </Card>
  <Card
    title="Surfpool CLI Basics"
    href="/docs/intro/installation/surfpool-cli-basics"
  >
    Run a local validator and inspect it with Surfpool Studio.
  </Card>
</Cards>
