Solana config
Your Solana config specifies the following variables:- Config file: The path to your config file
- RPC URL & Websocket URL: The Solana cluster to which the CLI makes requests
- Keypair path: The path to the default Solana wallet (keypair) used to pay
transaction fees and deploy programs. By default, this file is stored at
~/.config/solana/id.json.
Terminal
Example output
Terminal
Create a wallet
Before you can send transactions using the Solana CLI, you need a Solana wallet funded with SOL. To generate a keypair at the default keypair path, run the following command:Terminal
Example output
This command will not override an existing account at the default location,
unless you use the
--force flag.Terminal
Airdrop SOL
Your wallet needs SOL to pay for transactions and program deployments. On devnet, get free test SOL from the Solana Faucet.- Set your cluster to devnet:
Terminal
- Print your wallet address, paste it into the Solana Faucet, and request devnet SOL:
Terminal
The devnet RPC faucet is closed, so
solana airdrop on devnet fails with
airdrop request failed. This can happen when the rate limit is reached.
solana airdrop 2 still works against a local validator
(solana config set -ul). See
Airdrops and faucets
for other ways to get test SOL.Terminal