Airdrops & Balances
Fund dev and test wallets with faucet airdrops and inspect SOL balances from the CLI before you send transactions.
Recipe
Quick-reference recipe card - copy-paste ready.
solana config set --url devnet
solana airdrop 2
solana balance
solana balance <PUBKEY>When to reach for this:
- New keypair has zero lamports and cannot pay fees.
- Verifying a transfer landed on the expected account.
- Checking a recipient balance before a second transaction.
- Confirming localnet faucet funding after starting
solana-test-validator.
Working Example
solana config set --url devnet
solana config set --keypair ~/.config/solana/id.json
# Request 2 SOL (subject to faucet rate limits)
solana airdrop 2
solana confirm -v $(solana transfer --from ~/.config/solana/id.json \
"$(solana address)" 0.001 --allow-unfunded-recipient --dry-run 2>/dev/null | head -1) 2>/dev/null || true
solana balance
solana balance "$(solana address)"What this demonstrates:
- Devnet faucet funds the default keypair for transaction fees.
solana balancereads lamports and formats as SOL.- Passing an explicit pubkey inspects any account, not only the configured signer.
Deep Dive
How It Works
- Balances are stored as lamports in the account model (1 SOL = 1,000,000,000 lamports).
solana airdroprequests lamports from the cluster faucet (devnet/testnet only).- The CLI calls
getBalanceover JSON-RPC and converts to SOL for display. - Mainnet has no public faucet - fund via exchange or transfer.
Airdrop Limits
| Cluster | Faucet | Typical limit |
|---|---|---|
| devnet | Public RPC faucet | Rate-limited per IP/key |
| testnet | Public faucet | Lower traffic than devnet |
| mainnet-beta | None | Real SOL required |
| localnet | solana-test-validator | Generous for local keys |
bash Notes
# Airdrop to a specific pubkey (not only default keypair)
solana airdrop 1 <RECIPIENT_PUBKEY>
# Watch balance after a transfer
watch -n 2 solana balanceGotchas
- Airdropping on mainnet - no faucet exists; command fails or you use a scam site. Fix: use devnet/localnet for free SOL, mainnet only with real funds.
- Rate limit errors - devnet faucet caps requests per hour. Fix: wait, use a different IP, or switch to localnet.
- Unfunded signer - transactions fail with "insufficient funds for fee". Fix:
solana balancefirst; airdrop 1-2 SOL on devnet. - Wrong cluster - airdrop succeeds but config still points at a different RPC. Fix:
solana config getand verifyRPC URL. - Assuming UI SOL equals on-chain - some tools round; rent-exempt minimums matter for accounts. Fix: compare raw lamports via
solana accountwhen debugging.
Alternatives
| Alternative | Use When | Don't Use When |
|---|---|---|
solana-test-validator faucet | Unlimited local iteration | You need real program state from mainnet |
| Provider devnet faucets (Helius, etc.) | Higher rate limits | You want zero external dependencies |
| Manual transfer from funded wallet | Team shared dev pool | Solo first-time setup |
spl-token minting | Testing tokens, not native SOL | Paying transaction fees |
FAQs
How much SOL should I airdrop?
1-2 SOL is enough for thousands of devnet transactions. Request more only when testing large transfers or rent-heavy account creation.
Why did my airdrop fail with rate limit?
Devnet faucets throttle by IP and pubkey. Wait 24 hours, use localnet, or fund from a teammate's wallet.
Can I airdrop to someone else's pubkey?
Yes: solana airdrop 2 <PUBKEY> while pointed at devnet or testnet.
Does balance include rent-exempt reserves?
solana balance shows total lamports. Token and data accounts also hold rent-exempt minimums separate from your wallet balance display context.
How do I check balance on localnet?
Point config at http://127.0.0.1:8899, start solana-test-validator, then solana airdrop works against the local faucet.
What is the minimum for fees?
A simple transfer costs 5,000 lamports base fee plus priority fee. Keep at least 0.01 SOL on dev wallets for headroom.
How fast does balance update after airdrop?
Usually one slot (~400ms). Use solana confirm <SIGNATURE> when scripting funding steps.
Can I airdrop on testnet?
Yes with solana config set --url testnet. Faucet availability varies - devnet is the default choice.
How do I see lamports instead of SOL?
Use solana account <PUBKEY> and read the lamports field in the output.
Does airdrop work in CI?
Often blocked by shared IP rate limits. Pre-fund a CI keypair once and store it as an encrypted secret, or use localnet in pipelines.
Related
- Solana CLI Basics - cluster configuration
- Keypairs with solana-keygen - create the wallet you fund
- Sending SOL & Transactions - spend the balance
- solana-test-validator - local faucet
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.