Solana Development Environment Setup
Set up the Solana CLI the right way, create a wallet, switch to devnet, fund it, and verify your machine is ready for the rest of the course.
Most setup guides teach Solana like it is just another SDK install.
That is the wrong mental model.
What you are really doing in this lesson is preparing three things:
- A command-line tool that can talk to Solana
- A keypair that acts as your wallet identity
- A network target, usually devnet, where your commands will run
If those three pieces are clear in your head, the rest of this section gets much easier.
This lesson is not about memorizing commands. It is about understanding what each command changes on your machine and on the network.
What You Are Setting Up
By the end of this lesson, you will be able to:
- Install the Solana CLI and verify that it works
- Create a local wallet keypair and understand where it lives
- Point your CLI at the correct cluster
- Request devnet SOL and confirm your wallet is funded
- Inspect your environment before you start building
That may sound basic, but this is where a lot of beginners get lost.
They install the CLI, run a few commands, and then have no idea:
- which wallet they are using
- which network they are connected to
- where their private key is stored
- why one command works and the next one fails
We are going to fix that now.
The Three Pieces You Need to Track
Before you type anything, lock in this model:
- The CLI is the tool
- The keypair is the identity
- The cluster is the environment
If something breaks, the problem is usually one of those three.
When Solana commands behave strangely, do not guess. Check your CLI version, your wallet address, and your current cluster first.
Step 1: Install the Solana CLI
The Solana CLI is your terminal interface to the network. You will use it to:
- inspect wallet state
- request devnet funds
- switch networks
- deploy programs later
- debug account and transaction behavior
Install it with:
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"If your shell does not pick up the binary automatically, add the Solana install directory to your PATH:
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"Now verify the install:
solana --versionIf that command prints a version, the CLI is installed correctly.
If it says command not found, the install may have succeeded but your shell still cannot find the binary. That is a PATH problem, not a Solana problem.
If you are on Windows, use WSL2. Solana and Rust tooling are much more predictable there than in a native Windows shell.
Step 2: Create Your Wallet Keypair
Beginners often say “create a wallet” as if the wallet is a website account.
It is not.
On Solana, your wallet is a cryptographic keypair:
- the public key is your address
- the private key signs transactions
Generate one with:
solana-keygen newThis command writes a new keypair file to disk. By default, it usually ends up here:
~/.config/solana/id.jsonThat file matters.
It is not a cache file. It is not disposable setup output. It is the private key material for the wallet you are about to use.
Check the address for that wallet
solana addressThis prints the public key for the keypair the CLI is currently using.
If you want to see the full CLI configuration, run:
solana config getYou should see at least:
- the RPC URL
- the websocket URL
- the keypair path
That output tells you which machine identity and which cluster your CLI is actually using.
Do not commit id.json to Git. If someone gets that file, they control that wallet.
Step 3: Point the CLI at Devnet
Solana has multiple clusters. A cluster is just a running network environment.
For this course, the default target is usually devnet because it is public, free to use, and safe for learning.
Set it explicitly:
solana config set --url https://api.devnet.solana.comThen verify it:
solana config getDo not skip that verification step.
A lot of beginner confusion comes from assuming the CLI is on devnet when it is actually pointed somewhere else.
What the main clusters are for
Step 4: Fund the Wallet on Devnet
Even on devnet, transactions are not free.
You still need SOL to pay transaction fees. The difference is that on devnet, you can ask for test SOL from a faucet.
Request an airdrop:
solana airdrop 2Then confirm your balance:
solana balanceIf the airdrop fails, do not immediately reinstall everything. Check the obvious things first:
- are you on
devnet? - are you using the wallet you think you are using?
- is the faucet rate-limiting requests?
This is why the earlier solana config get step matters.
Step 5: Learn the Minimum CLI Health Check
Before you move to the next lesson, get comfortable with this tiny inspection workflow:
solana --version
solana config get
solana address
solana balanceThose four commands answer the four questions that matter most:
- Is the CLI installed?
- Which cluster am I talking to?
- Which wallet am I using?
- Does that wallet have SOL?
If you build the habit of checking those early, you will debug much faster later.
The Workflow You Are Building
Install the tool
Install the CLI and make sure your shell can actually run solana.
Create the identity
Generate a keypair and understand that the file on disk is your wallet.
Choose the environment
Point the CLI at devnet so your commands hit the correct network.
Fund the wallet
Request devnet SOL and confirm the balance before trying anything more advanced.
Inspect before debugging
Use solana config get, solana address, and solana balance before assuming something is broken.
That is the real setup flow. Not “install package, move on.”
Common Mistakes That Waste Time
Mistake: Treating the wallet like an app login
Your wallet is a keypair file on disk. If you change that file, or point the CLI to a different file, you are using a different identity.
Mistake: Forgetting the active cluster
If you airdrop on devnet and later point the CLI to localnet or mainnet, your balance will appear to “disappear.” It did not disappear. You changed environments.
Mistake: Trusting memory instead of config
Do not rely on what you think your machine is using. Run solana config get and verify it.
Mistake: Using mainnet too early
Mainnet is not a place to learn basic tooling. Learn on devnet, then move to localnet and production flows when your mental model is solid.
What This Enables Next
With the CLI working, a funded devnet wallet, and a clear cluster configuration, you are ready for the rest of this section.
That means you can now start learning the parts that actually make Solana feel different:
- how accounts hold state
- why lamports matter
- how transactions are structured
- how programs interact with accounts
Without this setup, those lessons feel abstract.
With this setup, they become testable.
Summary
Here is the core takeaway:
- The CLI is your tool
- The keypair is your identity
- The cluster is your environment
Once those are clear, Solana setup stops feeling random.
You now have:
- a working Solana CLI
- a wallet keypair on your machine
- a devnet configuration
- test SOL for experiments
- a repeatable way to verify your environment before building
That is enough foundation for the next lesson.