The terminal cannot find the flutter or dart command
'flutter' is not recognized as an internal or external command, operable program or batch fileShort answer
The flutter and dart programs both live in the bin folder of the Flutter SDK, so one PATH entry gives you both. If the shell says the command is not found, that folder is not on PATH, the terminal was opened before you changed it, or the SDK sits in a protected folder. Add the bin path, open a new terminal, run flutter --version.
Fix it fast
1Find out which cause you have
Ask the shell where it finds the commands. Empty output means the SDK bin folder is not on PATH.
# macOS and Linux which flutter which dart # Windows where flutter where dart2Match what you see, then jump to its fix
- 1
No output from which or where, and the not-recognized message on every new terminalThe SDK bin folder was never added to PATHFix - 2
The variable is set in the system dialog or profile file, but the open window still cannot find the commandThe terminal or IDE was opened before PATH changedFix - 3
The Flutter SDK is installed in a protected folder and may not function correctly.On Windows the SDK is in a protected folderFix
- 1
What does the error look like?
'flutter' is not recognized as an internal or external command, operable program or batch filezsh: command not found: flutterbash: flutter: command not foundThe Flutter SDK is installed in a protected folder and may not function correctly.
Cause 1 of 3
The SDK bin folder was never added to PATH
1Check
Flutter's setup guide says that adding the SDK bin directory to PATH is what makes both flutter and dart runnable from anywhere. Print your PATH and look for the SDK folder.
echo $PATH2Fix
On macOS with zsh, add one line to ~/.zprofile and use the real path of your SDK. On Windows, edit the user Path variable in Environment Variables and add the same bin folder.
# ~/.zprofile (macOS, zsh)
export PATH="$HOME/develop/flutter/bin:$PATH"3Verify
Close the terminal, open a new one and print both versions.
flutter --version
dart --versionConfirmed by docs.flutter.dev
Cause 2 of 3
The terminal or IDE was opened before PATH changed
1Check
A running terminal keeps the PATH it started with. The Flutter guide tells you to close and reopen all terminals and IDEs after the change.
# Linux and macOS: is the line in your profile file?
grep -n "flutter" ~/.zprofile ~/.bashrc ~/.zshenv 2>/dev/null2Fix
Quit the terminal and the IDE completely and start them again. Do not just open a new tab in the old window.
# nothing to run: close all terminal windows and the IDE, then reopen3Verify
In the new window the command now resolves.
flutter --versionConfirmed by docs.flutter.dev
Cause 3 of 3
On Windows the SDK is in a protected folder
1Check
Flutter's troubleshooting page says not to place the SDK under C:\Program Files because that folder needs elevated privileges.
where flutter2Fix
Move the SDK to a normal user-owned folder such as C:\src\flutter, then correct the Path entry to point at the new bin folder.
# new Path entry
C:\src\flutter\bin3Verify
Open a new terminal and run the doctor.
flutter doctorConfirmed by docs.flutter.dev
How do I stop it coming back?
- Keep one Flutter SDK location and one PATH entry; delete old entries when you move the SDK.
- Run flutter doctor after any machine setup change.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- Qist BazaarA buy-now-pay-later marketplace built from a blank repo, now past 100K downloads on Google Play.
- SessionBirdAn omnichannel engagement suite in Flutter: campaigns, chatbot, tickets, analytics and live calling.
Related fixes
Mobile apps
Terminal says fvm: command not found after installing FVM
zsh: command not found: fvm
The shell cannot find an fvm executable.
2 causes, each with a fixMobile apps
Terminal says pub: command not found after installing Dart
dart: command not found
The standalone pub program no longer exists in current Dart.
2 causes, each with a fixMobile apps
flutter doctor warns that dart on your path is not in the Flutter SDK
Consider adding C:\flutter\bin to the front of your path.
flutter doctor found a dart program on your PATH that lives outside the Flutter SDK folder, usually a separate Dart SDK installed earlier in the list.
3 causes, each with a fixMobile apps
flutter doctor fails the Network resources check
A cryptographic error occurred while checking
The Network resources check sends a request to a fixed list of hosts and fails if one does not answer.
2 causes, each with a fixMobile apps
A Flutter command says it cannot find pubspec.yaml
This command should be run from the root of your Flutter project.
Flutter and Dart read pubspec.yaml from the current working directory.
3 causes, each with a fixMobile apps
Running flutter prints 'Error: Unable to find git in your PATH'
Error: The Flutter directory is not a clone of the GitHub project.
The flutter launcher script runs git before anything else.
3 causes, each with a fix