How to Install Solidity: A Complete Guide for Beginners (2025)

How to Install Solidity: A Complete Guide for Beginners (2025)

Ready to build smart contracts on the Ethereum blockchain? The first tool you need is the Solidity compiler, often called solc. This program turns your human-readable Solidity code into bytecode that the Ethereum Virtual Machine (EVM) can understand.

This guide will walk you through the most common and effective ways to install it. For any real project you plan to deploy, always use the latest stable version.


The Easiest Start: Remix IDE 🚀

If you're new to Solidity or working on small contracts, the easiest way to start is with Remix.

Remix is a powerful, web-based IDE that runs entirely in your browser. It comes with the Solidity compiler built-in, so you don't need to install anything on your computer. It's the perfect tool for learning, writing, and testing contracts quickly.

➡️ Get started now with Remix online


Installing the Command-Line Compiler

For larger projects or more advanced development workflows, you'll want to install the command-line compiler on your computer. Here are the most popular methods.

Using npm (For JavaScript Developers)

If you're already working with Node.js and npm, this is a very convenient option. This method installs solcjs, a JavaScript version of the Solidity compiler.

npm install --global solc

Using Docker (For a Clean, Isolated Setup)

Docker lets you run applications in isolated "containers," which avoids conflicts with other software. To run the latest stable compiler version, use this command:

docker run ethereum/solc:stable --version

Using Package Managers (Linux & macOS)

For Linux or macOS, using a package manager is often the simplest approach.

For Ubuntu/Debian, use these commands:

sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc

For macOS with Homebrew, run this:

brew update
brew tap ethereum/ethereum
brew install solidity

Verifying Your Installation ✅

Once installed, you can verify that everything is working correctly by opening your terminal and checking the version.

solc --version

If you installed it via npm, use solcjs --version instead. If the command returns a version number, you're all set!


Want to Learn More?

This guide covers the essentials to get you started. For more advanced topics, such as building from source or using other installation methods, the official Solidity documentation is the best resource.

Explore the Official Solidity Installation Docs

Comments

Popular posts from this blog

How to Easily Install Rust on WSL (Ubuntu 24.04)

How to Install Ubuntu 24.04 WSL on Windows 10 and 11

Introduction to Rust: Writing Your First "Hello, World!"