How to receive or generate SOL for Solana Testnet (testnet.solana.com
) for testing purposes?
3 Answers
When you're working locally, you need some SOL in order to send transactions. In non-mainnet environments you can receive SOL by airdropping it to your address
With the CLI you can run the airdrop command:
Testnet:
solana airdrop 1 --url testnet
Devnet:
solana airdrop 1 --url devnet
See the Solana cookbook on how to airdrop in other environments.
-
1This assumes that the CLI tools are configured to point at testnet.
--url testnet
can be passed with the above command to assert this Commented Jul 12, 2022 at 23:57
for folks that don't have their CLI setup or just need devnet / testnet SOL at a moment's notice, https://solfaucet.com has an airdrop interface that you can access from your browser!