Prerequisites
Before installing Dart, make sure your system meets these requirements:
- Windows 10 / macOS 10.14+ / Ubuntu 18.04+
- Internet connection
- Administrator/sudo privileges
Install on Windows
The easiest way to install Dart on Windows is using the Chocolatey package manager.
choco install dart-sdk
Alternatively, download the Windows SDK installer from the official Dart website at dart.dev/get-dart and follow the installation wizard.
Install on macOS
Use Homebrew to install Dart on macOS:
brew tap dart-lang/dart
brew install dart
To upgrade an existing installation:
brew upgrade dart
Install on Linux
On Debian/Ubuntu systems:
sudo apt-get update
sudo apt-get install apt-transport-https
wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg
echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
sudo apt-get update
sudo apt-get install dart
Verify Installation
After installation, open your terminal and run:
dart --version
Output:
Dart SDK version: 3.x.x (stable) on "linux_x64"
You should see the installed Dart version. Also verify the dart command works:
dart help
📝 Note: If you plan to use Flutter, installing Flutter SDK also installs the compatible Dart SDK automatically. You do not need to install Dart separately when using Flutter.
💪 Exercise
- Install Dart SDK on your operating system.
- Open a terminal and verify the installation with
dart --version.
- Run
dart help and explore the available commands.
🧠 Quiz
1. Which command verifies the Dart installation?
- A) dart check
- B) dart --version ✅
- C) dart install
- D) dart verify
2. Which tool installs Dart on macOS?
- A) npm
- B) apt-get
- C) Homebrew ✅
- D) pip
Summary
You can install the Dart SDK on Windows (Chocolatey), macOS (Homebrew), or Linux (apt-get). After installation, verify it with dart --version. If you use Flutter, the Dart SDK is included automatically.