current location:Home >> Blockchain knowledge >> Solana CLI Overview

Solana CLI Overview

admin Blockchain knowledge 595

he Solana Command Line Interface (CLI) is a powerful tool for interacting with the Solana blockchain. Here are the essential commands and concepts:

Installation

Solana CLI Overview
sh -c "$(curl -sSfL https://release.solana.com/v1.17.11/install)"

Basic Commands

Wallet Management

# Create new wallet
solana-keygen new --outfile ~/.config/solana/id.json

# Check wallet balance
solana balance

# Request airdrop (testnet/devnet)
solana airdrop 1

Network Configuration

# Set cluster (mainnet-beta, testnet, devnet, localhost)
solana config set --url https://api.mainnet-beta.solana.com

# View current config
solana config get

Transaction Operations

# Send SOL
solana transfer <RECIPIENT_ADDRESS> 0.5 --from ~/.config/solana/id.json

# Check transaction status
solana confirm <TRANSACTION_SIGNATURE>

Staking

# Create stake account
solana create-stake-account ~/stake-account.json 10

# Delegate stake
solana delegate-stake ~/stake-account.json <VALIDATOR_VOTE_ACCOUNT>

Token Operations

# Create token account
spl-token create-account <TOKEN_MINT_ADDRESS>

# Mint tokens
spl-token mint <TOKEN_MINT_ADDRESS> 1000

Advanced Features

Program Deployment

# Deploy a program
solana program deploy program.so

Validator Operations

# Start validator
solana-validator --identity ~/validator-keypair.json --ledger ~/ledger

Help Resources

# Get help for any command
solana --help
solana <COMMAND> --help

Remember to replace placeholders like <RECIPIENT_ADDRESS> with actual values. The Solana CLI is frequently updated, so check the official documentation for the latest features and syntax.

If you have any questions or uncertainties, please join the official Telegram group: https://t.me/GToken_EN

GTokenTool

GTokenTool is the most comprehensive one click coin issuance tool, supporting multiple public chains such as TON, SOL, BSC, etc. Function: Create tokensmarket value managementbatch airdropstoken pre-sales IDO、 Lockpledge mining, etc. Provide a visual interface that allows users to quickly create, deploy, and manage their own cryptocurrencies without writing code.

Similar recommendations