Basic Solana Operations
Published on 05 Apr 2025
Introduction to Solana CLI and Basic Wallet Operations
Overview
- This article introduces Solana CLI for basic operations like wallet creation and fund transfers.
Setup & Installation
- Solana CLI Installation:
sh -c "$(curl -sSfL https://release.solana.com/v1.8.0/install)"
- Rust Installation (Solana’s primary language):
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup component add rustfmt
Wallet Basics
A wallet consists of a public key (account address) and a private key (signature authorization).
- Solana wallet types:
- Paper Wallet
- Hardware Wallet
- File System Wallet (covered in this guide).
Creating a File System Wallet
-
Generate a new wallet:
solana-keygen new
or
solana-keygen new --outfile /root/solana/my_wallet.json
-
Retrieve the public key:
solana-keygen pubkey ~/solana/my_wallet.json
-
Verify the wallet:
solana-keygen verify <PUBKEY> /root/solana/my_wallet.json
Solana CLI Configuration
- Check current config:
solana config get
- Set a custom wallet path:
solana config set --keypair /root/solana/my_wallet.json
- Switch to Solana Testnet (for testing):
solana config set --url https://api.devnet.solana.com
Testnet Operations
- Airdrop SOL (free test tokens):
solana airdrop 2
- Transfer SOL between wallets:
solana transfer <RECIPIENT_PUBKEY> 1 --allow-unfunded-recipient
- Check balances:
solana balance <PUBKEY>
- Transaction fees are deducted from the sender’s balance.
Next Steps
- The next article will cover minting custom tokens on Solana.
This guide provides a foundation for Solana CLI usage, enabling users to manage wallets and execute transactions on the Testnet.
all tags
IDE architecture" blockchain cli crontab crypto csv database docker editor error exceptions fastapi ffmpeg filename git go history http iteration javascript linux logging me mysql numpy orm pdo pentaho php postgres python random rename rsync rust selenium server solana sql sqlite ssh typescript user w3m wordpress