# Getting Started with the Solana CLI > A Beginner's Tutorial From A Beginner **Published by:** [Graymans Block](https://paragraph.com/@grayman/) **Published on:** 2024-03-04 **Categories:** solana, blockchain, tutorial **URL:** https://paragraph.com/@grayman/solana-cli-guide ## Content IntroductionI have started a bit of a journey to discover the Solana blockchain and ecosystem. This here is a beginner's guide I've created from the knowledge I've learned from using the Solana Command Line Interface (CLI). The Solana CLI is a powerful tool that lets you interact with the Solana blockchain, enabling you to manage wallets, send transactions, and more. This tutorial will walk you through the basics to get you started. A little warning, use of the Solana CLI and interaction with the Solana blockchain involves risks, including but not limited to loss of funds, security vulnerabilities, and regulatory implications. It is essential to know and understand the regulatory environment of your jurisdiction before engaging in blockchain-related activities.Step 1: Installing the Solana CLIFirst, you need to install the Solana CLI on your system. The process is straightforward and varies slightly depending on your operating system.For macOS and Linux:Open your terminal and run the following command:sh -c "$(curl -sSfL https://release.solana.com/stable/install)"For Windows Users:Windows users should use the Windows Subsystem for Linux (WSL) and then run the same command as macOS and Linux users.Check the Installation:After installing, you can check if it was successful by running:solana --versionThis command will display the version of Solana CLI installed.Step 2: Setting Up the NetworkSolana operates on different networks: Mainnet Beta, Testnet, and Devnet. To set your environment to one of these networks, use the config set command:solana config set --url Replace with the appropriate URL for your desired network:Mainnet Beta: https://api.mainnet-beta.solana.comTestnet: https://api.testnet.solana.comDevnet: https://api.devnet.solana.comStep 3: Creating a WalletA wallet is essential for holding your SOL tokens and interacting with the Solana blockchain. To create a new wallet:solana-keygen new --outfile ~/my-solana-wallet.jsonThis command creates a new wallet and saves the keypair to the specified file. Keep this file safe, as it contains your private keys.Checking Your Wallet Balance:To check the balance of your wallet, use:solana balanceThis command will show the current balance of your SOL tokens.Step 4: Sending SOLYou can send SOL to another address using the transfer command. Here's how:solana transfer --from ~/my-solana-wallet.json Replace with the address of the recipient and with the amount of SOL you wish to send.Step 5: Viewing Transaction HistoryTo view your account's transaction history and details, use the account command:solana account This will provide information about your account, including its transaction history.More Fun With SolanaThe Solana CLI offers a wide array of commands for various operations on the Solana blockchain. Beyond the basics of creating wallets, transferring SOL, and checking balances, here are a few more commands that unlock additional functionalities:1. Airdropping SOL (Devnet/Testnet)To receive SOL for testing purposes on Devnet or Testnet, you can use the airdrop command. This is useful for development and testing without using real funds.solana airdrop --url Replace with the number of SOL you want to receive, with your wallet address, and with the URL of Devnet or Testnet.2. Staking SOLYou can delegate SOL to a validator to participate in staking and earn rewards.Create a Stake Account: solana create-stake-account --from --stake-authority --withdraw-authority This command creates a new stake account with a specified amount of SOL.Delegate Stake: solana delegate-stake --stake-authority Use this command to delegate your stake to a validator by specifying the stake account and the validator's vote account address.3. Creating and Managing TokensSolana supports the creation of custom tokens through the SPL Token program.Create a New Token: spl-token create-token This command creates a new token and outputs the token's mint address.Create a Token Account: spl-token create-account Creates a new account for holding tokens of the specified mint.Minting Tokens: spl-token mint Mint new tokens to a specified account.4. Confirming TransactionsTo check the status of a transaction:solana confirm This command allows you to confirm that a transaction has been successfully processed.5. Deploying Programs (Smart Contracts)Deploying a compiled program to the Solana blockchain:solana program deploy This is used for deploying smart contracts (or programs, in Solana terminology) to the network. These commands represent just a fraction of what's possible with the Solana CLI. Each command has a variety of options and flags to customize its behavior, making the CLI a powerful tool for developers and users alike to interact with the Solana blockchain efficiently.Note: By using the information in this post, the reader agrees to the terms of this disclaimer and acknowledges understanding the risks involved in using the Solana blockchain and its associated tools and technologies. ## Publication Information - [Graymans Block](https://paragraph.com/@grayman/): Publication homepage - [All Posts](https://paragraph.com/@grayman/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@grayman): Subscribe to updates ## Optional - [Collect as NFT](https://paragraph.com/@grayman/solana-cli-guide): Support the author by collecting this post - [View Collectors](https://paragraph.com/@grayman/solana-cli-guide/collectors): See who has collected this post