Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

The terminal cannot find the flutter or dart command

Error'flutter' is not recognized as an internal or external command, operable program or batch file

Short 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.

  • Applies to Flutter 3.35, Dart 3.9, Windows 11, macOS 15, Ubuntu 24.04
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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 dart
  2. 2Match what you see, then jump to its fix

    1. 1No output from which or where, and the not-recognized message on every new terminalThe SDK bin folder was never added to PATHFix
    2. 2The 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. 3The Flutter SDK is installed in a protected folder and may not function correctly.On Windows the SDK is in a protected folderFix

What does the error look like?

  • 'flutter' is not recognized as an internal or external command, operable program or batch file
  • zsh: command not found: flutter
  • bash: flutter: command not found
  • The 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 $PATH

2Fix

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 --version

Confirmed by docs.flutter.dev

Did this fix it?

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/null

2Fix

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 reopen

3Verify

In the new window the command now resolves.

flutter --version

Confirmed by docs.flutter.dev

Did this fix it?

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 flutter

2Fix

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\bin

3Verify

Open a new terminal and run the doctor.

flutter doctor

Confirmed by docs.flutter.dev

Did this fix it?

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:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.