Anchor the framework for Solana development, currently lacks support for Windows systems. Hence, a Linux environment is required for compatibility with Solana tools and technologies.
This article will guide you through installing Windows Subsystem for Linux (WSL) and other necessary dependencies and technologies, such as Rust, Solana CLI, Node.js, and Yarn, required for Solana development on your Windows system.
Windows 10+
Good Internet connection
Solana enthusiast
You will install Windows Subsystem for Linus (WSL), Rust and Cargo, Solana CLI, Node.js, Yarn, and Vs code.
WSL will allow you to run a Linux environment directly on your Windows system.
Open your Powershell in
wsl --install
The default wsl distribution, ubuntu, will be installed.
Once installation is complete, restart your machine.
Confirm your WSL version and distribution.
wsl -l -v
You should see this:
Set up your Linux distribution username and password
Be sure to save your password somewhere else.
If you run into installation
Cargo is a Rust package manager for managing dependencies, building, testing, and deploying Rust codes.
To install Rust and Cargo, run this command on your Ubuntu
curl - proto '=https' - tlsv1.2 -sSf https://sh.rustup.rs | sh
Then, Press 1 or enter to complete the installation
Once installation is complete, confirm your Rust and Cargo version with the following commands
rustc --version
cargo --version
To install Solana, run this command on your Ubuntu
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
After the installation is complete, confirm the Solana version using this command
solana --version
Create your Solana wallet and generate your keypairs.
Create a default Solana wallet, generate your keypairs, and request free devnet tokens for your wallet.
To create your Solana wallet use this command
solana-keygen new
create a passphrase
Ensure to save your public key(a.k.a wallet address) and passphrase(highlighted below in yellow) in a secure location.
Your private key is stored locally on your PC.
Request for devnets to deploy your Solana programs.
To get 10 Solana devnet tokens for your wallet, run this command
Solana airdrop 10
This will send devnet to the default wallet you just created.
To send to a different wallet, useSolana airdrop 10 <wallet address>
If you’ve previously installed Node.js on your Windows, you should consider installing Node.js again specifically within your WSL to ensure compatibility.
To Install Node.js using Node Version Manager (NVM)
Run this nvm command on your Ubuntu
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
confirm NVM installation
command -v nvm
you should see this
Otherwise, close and reopen your Ubuntu and rerun the command.
Install the stable LTS version of Node Js with this command
nvm install - lts
Confirm the installations of Node.js and npm versions
node --version
npm --version
npm yarn global installation is not recommended.
To install yarn, enable core pack and initialize a yarn project using the following commands
npm install -g corepack
corepack enable
yarn init
Download VScode directly from the
To enable support for the WSL environment in your VSCode, install the WSL extension.
To do so, open VScode, click on the marketplace or “Ctrl + shift + x “, then search for and install the Remote — WSL Extension.
Additionally, install the ‘rust-analyzer’ extension for Rust language support.
Install Anchor using Anchor Version Manager (AVM) with this command
cargo install - git https://github.com/coral-xyz/anchor avm - locked - force
Install the latest Anchor version and set it as the default, using the following commands:
avm install latest
avm use latest
Confirm Anchor installation
Anchor –version
If you encounter any installation error check
Congratulations 🥳 you are all set to develop on Solana Blockchain