Solana CLI Wallets and Essential Operations Guide

·

Solana's command-line interface (CLI) offers a powerful and flexible way to manage your digital assets directly from the terminal. Whether you're a developer, blockchain enthusiast, or just exploring decentralized technologies, understanding how to use Solana CLI wallets is crucial for interacting securely with the Solana network. This guide walks you through the three primary wallet types—File System Wallets, Paper Wallets, and Hardware Wallets—and covers essential operations like generating keys, verifying addresses, requesting airdrops, checking balances, and transferring tokens.

Understanding Solana CLI Wallet Types

Solana CLI supports multiple wallet formats, each designed for different security and usability needs. The three main types are:

While hardware wallets offer the highest security and are recommended for long-term storage of significant funds, this article focuses on File System and Paper Wallets, which are ideal for learning, testing, and development on Solana’s testnet.

👉 Discover how to securely manage your digital assets using advanced tools

File System Wallet (FS Wallet)

A File System Wallet stores your private key pair in an unencrypted JSON file on your local machine. While convenient for developers, it's inherently less secure because the file is stored in plain text. Always ensure your system is protected and never share the keypair file online.

Create a File Wallet

Use the following command to generate a new keypair:

solana-keygen new --outfile ~/my-solana-fs-wallet-keypair.json

You’ll be prompted to enter an optional BIP39 passphrase—this enhances the security of your recovery phrase but does not encrypt the file itself.

Example output:

Wrote new keypair to /root/my-solana-fs-wallet-keypair.json
pubkey: 8vxsHAq9rCdy4bpH1wKNrNVy6qHismAdFbFv9dAXncXn
Save this seed phrase and your BIP39 passphrase to recover your new keypair:
nut angry advance laptop hybrid zero equip accident skin clock canoe evoke
🔐 Important: Back up both the seed phrase and the JSON file securely. Anyone with access to the file can control your funds.

View Public Key

To retrieve the wallet address from the keypair file:

solana-keygen pubkey ~/my-solana-fs-wallet-keypair.json

Output:

8vxsHAq9rCdy4bpH1wKNrNVy6qHismAdFbFv9dAXncXn

Verify Key Pair Integrity

Ensure the public key matches the private key file:

solana-keygen verify 8vxsHAq9rCdy4bpH1wKNrNVy6qHismAdFbFv9dAXncXn ~/my-solana-fs-wallet-keypair.json

Returns Success if valid.

Recover from Seed Phrase

If you lose the JSON file, restore it using your seed phrase:

solana-keygen recover --outfile ~/my-solana-fs-wallet-keypair.json

After entering your 12-word seed phrase and optional passphrase, the tool regenerates the original keypair. You can verify recovery success by comparing checksums:

diff ~/my-solana-fs-wallet-keypair.json ~/my-solana-fs-wallet-keypair.json.orig

No output means the files match perfectly.


Paper Wallet

A paper wallet is a fully offline method of storing keys. No files are created—the private key and seed phrase are displayed only once during generation. This makes it highly secure if printed or written down and stored safely.

Generate a Paper Wallet

Run this command to create a paper wallet:

solana-keygen new --no-outfile

Output example:

pubkey: 4wr536h23WLB8WhXyZ2vV4RazNRmoRnhhb8zgKJD9Nqq
Seed phrase: column melt drift tone age fall coral sponsor derive chef marriage language
📝 Best Practice: Write down the seed phrase on paper and store it in a fireproof, waterproof location. Never take a screenshot or save it digitally unless encrypted.

Retrieve Public Key from Seed Phrase

You can regenerate the public key anytime using:

solana-keygen pubkey ASK

Then input your seed phrase when prompted.

Verify Paper Wallet Key Pair

Confirm authenticity with:

solana-keygen verify 4wr536h23WLB8WhXyZ2vV4RazNRmoRnhhb8zgKJD9Nqq ASK

Enter the seed phrase when asked—returns Success upon match.


Core Solana CLI Operations

Now that you’ve set up at least one wallet type, let’s perform fundamental actions on Solana’s testnet to avoid risking real funds.

Request Testnet Airdrop

Test SOL tokens are free and used for experimenting with transactions and smart contracts.

Request 10 test SOL:

solana airdrop 10 --url https://api.testnet.solana.com

For FS wallet:

solana airdrop 10 -k ~/my-solana-fs-wallet-keypair.json --url https://api.testnet.solana.com

For paper wallet (using public key):

solana airdrop 10 4wr536h23WLB8WhXyZ2vV4RazNRmoRnhhb8zgKJD9Nqq --url https://api.testnet.solana.com

Expected response:

Requesting airdrop of 10 SOL
Signature: [transaction-id]
10 SOL

👉 Learn how to bridge testnet assets efficiently across chains

Check Account Balance

View current balance using:

solana balance [PUBLIC_KEY] --url https://api.testnet.solana.com

Check FS wallet:

solana balance -k ~/my-solana-fs-wallet-keypair.json --url https://api.testnet.solana.com

Check paper wallet:

solana balance 4wr536h23WLB8WhXyZ2vV4RazNRmoRnhhb8zgKJD9Nqq --url https://api.testnet.solana.com

Output:

10 SOL

Transfer SOL Between Wallets

Send tokens from one wallet to another:

solana transfer --from [SENDER_KEY] [RECIPIENT_PUBKEY] [AMOUNT] --url https://api.testnet.solana.com --fee-payer [FEE_PAYER_KEY]

Example: Send 5 SOL from FS wallet to paper wallet:

solana transfer --from ~/my-solana-fs-wallet-keypair.json 4wr536h23WLB8WhXyZ2vV4RazNRmoRnhhb8zgKJD9Nqq 5 --url https://api.testnet.solana.com --fee-payer ~/my-solana-fs-wallet-keypair.json

After confirmation, check updated balances:

solana balance -k ~/my-solana-fs-wallet-keypair.json --url https://api.testnet.solana.com  
# Output: ~4.999995 SOL (deducted for transaction fee)

solana balance 4wr536h23WLB8WhXyZ2vV4RazNRmoRnhhb8zgKJD9Nqq --url https://api.testnet.solana.com  
# Output: 15 SOL

Frequently Asked Questions (FAQ)

Q: What are the risks of using a File System Wallet?
A: Since the private key is stored as plain text, any user or malware with access to your machine can steal your funds. Always use strong system security and consider encrypting the file manually.

Q: Can I reuse a paper wallet after spending from it?
A: Yes. As long as you keep the seed phrase safe, you can regenerate the same address anytime and continue receiving or sending funds.

Q: Is there a limit to how many times I can claim testnet SOL?
A: Yes. The faucet limits airdrops to prevent abuse—typically once every few minutes per address. Wait before retrying if denied.

Q: How do I switch from testnet to mainnet?
A: Replace --url https://api.testnet.solana.com with --url https://api.mainnet-beta.solana.com. Be extremely cautious—mainnet involves real money.

Q: Are BIP39 passphrases mandatory?
A: No, but they add an extra layer of protection for your seed phrase. Without one, anyone with your 12 words can fully recover your wallet.

Q: Can I import these wallets into GUI wallets like Phantom?
A: Yes. Use the 12-word recovery phrase to import into most Solana-compatible wallets. Never upload the .json file directly unless trusted.


Final Notes

Mastering Solana CLI fundamentals empowers you to interact with the blockchain at a deeper level. Whether building dApps, testing protocols, or managing assets programmatically, CLI tools provide unmatched flexibility.

Always prioritize security—especially with unencrypted key files—and use testnet environments whenever possible before going live.

👉 Start exploring real-world DeFi applications on Solana today

Core Keywords: Solana CLI wallet, File System Wallet, Paper Wallet, Solana testnet, airdrop SOL, transfer SOL, Solana keypair, BIP39 passphrase