Add Flutter to your PATH
Learn how to add Flutter to your PATH
environment variable after downloading the SDK. Adding Flutter to your PATH
allows you to use the flutter
and dart
command-line tools in terminals and IDEs.
Add Flutter to your path on Windows.
Add Flutter to your path on macOS.
Add Flutter to your path on Linux.
Add Flutter to your path on ChromeOS.
Windows
#To run flutter
and dart
commands in a terminal on Windows, add the Flutter SDK's bin
directory to the Path
environment variable.
Determine your Flutter SDK installation location
Copy the absolute path to the directory that you downloaded and extracted the Flutter SDK into.
Navigate to the environment variables settings
Press Windows + Pause.
If your keyboard lacks a Pause key, try Windows + Fn + B.
The System > About dialog opens.
Click Advanced System Settings > Advanced > Environment Variables...
The Environment Variables dialog opens.
Add the Flutter SDK bin to your path
In the User variables for (username) section of the Environment Variables dialog, look for the Path entry.
If the Path entry exists, double-click it.
The Edit Environment Variable dialog should open.
Double-click inside an empty row.
Type the path to the
bin
directory of your Flutter installation.For example, if you downloaded Flutter into a
dev\flutter
folder inside your user directory, you'd type the following:%USERPROFILE%\dev\flutter\bin
Click the Flutter entry you added to select it.
Click Move Up until the Flutter entry sits at the top of the list.
To confirm your changes, click OK three times.
If the entry doesn't exist, click New....
The Edit Environment Variable dialog should open.
In the Variable Name box, type
Path
.In the Variable Value box, type the path to the
bin
directory of your Flutter installation.For example, if you downloaded Flutter into a
dev\flutter
folder inside your user directory, you'd type the following:%USERPROFILE%\dev\flutter\bin
To confirm your changes, click OK three times.
Apply your changes
To apply this change and get access to the
flutter
tool, close and reopen all open command prompts, sessions in your terminal apps, and IDEs.Validate your setup
To ensure you successfully added the SDK to your
PATH
, open command prompt or your preferred terminal app, then try running theflutter
anddart
tools.flutter --version dart --version
If either command isn't found, check out Flutter installation troubleshooting.
macOS
#To run flutter
and dart
commands in a terminal on macOS, add the Flutter SDK's bin
directory to the PATH
environment variable.
Determine your Flutter SDK installation location
Copy the absolute path to the directory that you downloaded and extracted the Flutter SDK into.
Open or create the Zsh environment variable file
If it exists, open the Zsh environment variable file
~/.zshenv
in your preferred text editor. If it doesn't exist, create the~/.zshenv
file.Add the Flutter SDK bin to your path
At the end of your
~/.zshenv
file, use the built-inexport
command to update thePATH
variable to include thebin
directory of your Flutter installation.Replace
<path-to-sdk>
with the path to your Flutter SDK install.bashexport PATH="<path-to-sdk>/bin:$PATH"
For example, if you downloaded Flutter into a
development/flutter
folder inside your user directory, you'd add the following to the file:bashexport PATH="$HOME/development/flutter/bin:$PATH"
Save your changes
Save, then close, the
~/.zshenv
file you edited.Apply your changes
To apply this change and get access to the
flutter
tool, close and reopen all open Zsh sessions in your terminal apps and IDEs.Validate your setup
To ensure you successfully added the SDK to your
PATH
, open a Zsh session in your preferred terminal, then try running theflutter
anddart
tools.flutter --version dart --version
If either command isn't found, check out Flutter installation troubleshooting.
Linux
#To run flutter
and dart
commands in a terminal on Linux, add the Flutter SDK's bin
directory to the PATH
environment variable.
Determine your Flutter SDK installation location
Copy the absolute path to the directory that you downloaded and extracted the Flutter SDK into.
Determine your default shell
If you don't know what shell you use, check which shell starts when you open a new console window.
echo $SHELL
Add the Flutter SDK bin to your path
To add the
bin
directory of your Flutter installation to yourPATH
:- Expand the instructions for your default shell.
- Copy the provided command.
- Replace
<path-to-sdk>
with the path to your Flutter SDK install. - Run the edited command in your preferred terminal with that shell.
Expand for
bash
instructionsecho 'export PATH="<path-to-sdk>:$PATH"' >> ~/.bash_profile
For example, if you downloaded Flutter into a
development/flutter
folder inside your user directory, you'd run the following:echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.bash_profile
Expand for
zsh
instructionsecho 'export PATH="<path-to-sdk>/bin:$PATH"' >> ~/.zshenv
For example, if you downloaded Flutter into a
development/flutter
folder inside your user directory, you'd run the following:echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.zshenv
Expand for
fish
instructionsfish_add_path -g -p <path-to-sdk>/bin
For example, if you downloaded Flutter into a
development/flutter
folder inside your user directory, you'd run the following:fish_add_path -g -p ~/development/flutter/bin
Expand for
csh
instructionsecho 'setenv PATH "<path-to-sdk>/bin:$PATH"' >> ~/.cshrc
For example, if you downloaded Flutter into a
development/flutter
folder inside your user directory, you'd run the following:echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.cshrc
Expand for
tcsh
instructionsecho 'setenv PATH "<path-to-sdk>/bin:$PATH"' >> ~/.tcshrc
For example, if you downloaded Flutter into a
development/flutter
folder inside your user directory, you'd run the following:echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.tcshrc
Expand for
ksh
instructionsecho 'export PATH="<path-to-sdk>/bin:$PATH"' >> ~/.profile
For example, if you downloaded Flutter into a
development/flutter
folder inside your user directory, you'd run the following:echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile
Expand for
sh
instructionsecho 'export PATH="<path-to-sdk>/bin:$PATH"' >> ~/.profile
For example, if you downloaded Flutter into a
development/flutter
folder inside your user directory, you'd run the following:echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile
Apply your changes
To apply this change and get access to the
flutter
tool, close and reopen all open shell sessions in your terminal apps and IDEs.Validate your setup
To ensure you successfully added the SDK to your
PATH
, open your preferred terminal with your default shell, then try running theflutter
anddart
tools.flutter --version dart --version
If either command isn't found, check out Flutter installation troubleshooting.
ChromeOS
#To run flutter
and dart
commands in a terminal on chromeOS, add the Flutter SDK's bin
directory to the PATH
environment variable.
Determine your Flutter SDK installation location
Copy the absolute path to the directory that you downloaded and extracted the Flutter SDK into.
Add the Flutter SDK bin to your path
To add the
bin
directory of your Flutter installation to yourPATH
:- Copy the following command.
- Replace
<path-to-sdk>
with the path to your Flutter SDK install. - Run the edited command in your preferred terminal.
echo 'export PATH="<path-to-sdk>:$PATH"' >> ~/.bash_profile
For example, if you downloaded Flutter into a
development/flutter
folder inside your user directory, you'd run the following:echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.bash_profile
Apply your changes
To apply this change and get access to the
flutter
tool, close and reopen all open Zsh sessions in your terminal apps and IDEs.Validate your setup
To ensure you successfully added the SDK to your
PATH
, open a Zsh session in your preferred terminal, then try running theflutter
anddart
tools.flutter --version dart --version
If either command isn't found, check out Flutter installation troubleshooting.
Unless stated otherwise, the documentation on this site reflects the latest stable version of Flutter. Page last updated on 2025-05-13. View source or report an issue.