# Hello Solana (Anchor) Create an empty folder and complete all tasks below - Build - Test locally - Deploy to Devnet # Build Initialize a new Anchor project in an empty folder ```shell anchor init hello --test-template rust ``` Optionally update program id ```shell anchor keys sync ``` ```shell anchor build ``` # Test ```shell anchor test ``` Sometimes test fails for no apparent reason. Usually resetting Anchor fixes the issue. ```shell anchor clean ``` # Deploy to Devnet Update `Anchor.toml`, set `cluster` to `Devnet` ``` [provider] cluster = "Devnet" wallet = "~/.config/solana/id.json" ``` ```shell solana config set -ud solana balance # Airdrop if wallet balance is low solana airdrop 1 anchor build anchor deploy ``` Close program to reclaim SOL ```shell solana program close $PROGRAM_ID ```
Create an empty folder and complete all tasks below
Build
Test locally
Deploy to Devnet
Initialize a new Anchor project in an empty folder
Optionally update program id
Sometimes test fails for no apparent reason. Usually resetting Anchor fixes the issue.
Update Anchor.toml, set cluster to Devnet
Close program to reclaim SOL
A quickstart guide to Hello Solana (Anchor) - Navigate the essential Anchor framework workflow, from initializing and testing a new project to executing a live deployment on Devnet. Master the fundamental CLI commands for building smart contracts and learn how to close programs to recover your rent-exempt SOL.
Previous lesson
Previous
Next lesson
Next
Course Overview
About the course
Native Rust & Anchor framework
PDAs, CPIs, and SPL Tokens
DeFi builds: oracles, auctions, AMMs
Last updated on January 12, 2026
Rust Developer
SolanaDuration: 8min
Duration: 23min
Duration: 4min
Duration: 2min
Duration: 4min
Duration: 11min
Duration: 4min
Duration: 0min
Duration: 0min
Course Overview
About the course
Native Rust & Anchor framework
PDAs, CPIs, and SPL Tokens
DeFi builds: oracles, auctions, AMMs
Last updated on January 12, 2026