Step 9: Install Anchor on Windows and WSL
Last updated
Last updated
Anchor is a framework for Solana smart contract development. It simplifies the process of writing, testing, and deploying programs on SVM blockchains. To ensure compatibility and flexibility in your development environment, it's recommended to install Anchor both on your Windows system and within WSL. This section covers the installation process for both environments.
Install Anchor in Windows Terminal
Open Windows Terminal as Administrator:
This is necessary to ensure that the installation process has the required permissions.
Install Anchor CLI:
Run the following command in the terminal:
This command downloads and installs the latest version of Anchor CLI from the official GitHub repository.
Verify Installation:
To check that Anchor was installed correctly, type:
The terminal should display the version of Anchor CLI installed.
Install Anchor in WSL
To install Anchor within your WSL environment, follow these steps:
Open WSL Terminal:
Launch your WSL terminal from the Start menu or through VS Code's Remote - WSL extension.
Install Anchor CLI:
Execute the same Cargo command within your WSL terminal:
This ensures that Anchor CLI is available in your Linux environment, offering consistency across your development platforms.
Verify Installation:
Confirm the installation by checking the Anchor version in WSL:
The version number indicates that Anchor CLI is ready for use within WSL.