Maaz Zindani

Loading the index…

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

The Terminal on a Mac does not know the flutter command

Errorzsh: command not found: flutter

Short answer

zsh only runs programs found in folders listed in PATH. Flutter's launcher lives in the bin folder of the SDK, so that folder must be on PATH. Add one export line to ~/.zprofile with the absolute SDK path, then close every open Terminal and IDE session and open a new one.

  • Applies to Flutter 3.x stable, macOS 26, zsh
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Find out whether the SDK folder exists and what the shell currently searches. If the first command lists a flutter file, the SDK is fine and only PATH is wrong.

    ls ~/develop/flutter/bin/flutter
    echo $PATH | tr ':' '\n' | grep -i flutter
  2. 2Match what you see, then jump to its fix

    1. 1The echo command prints nothing, while the flutter file exists in the SDK's bin folderThe SDK bin folder was never added to PATHFix
    2. 2The grep above finds the export line, yet flutter is still not found in the window you already had openThe line is in the file, but the current session was started before itFix
    3. 3The line exists, new sessions were opened, and ls on the path from the line says No such file or directoryThe path in the export line does not match where the SDK really isFix

What does the error look like?

  • zsh: command not found: flutter
  • flutter --version fails but the SDK folder exists on disk

Cause 1 of 3

The SDK bin folder was never added to PATH

1Check

Open ~/.zprofile and look for an export PATH line that mentions your Flutter folder. Flutter's own macOS instructions use this file.

grep -n flutter ~/.zprofile

2Fix

Append the export line with the real absolute path of the folder where you extracted the SDK. $HOME/develop/flutter is only an example.

echo 'export PATH="$HOME/develop/flutter/bin:$PATH"' >> ~/.zprofile

3Verify

In a brand new Terminal window, both tools answer.

flutter --version
dart --version

Confirmed by docs.flutter.dev

Did this fix it?

Cause 2 of 3

The line is in the file, but the current session was started before it

1Check

A shell reads its profile once at start. Terminal tabs, VS Code and Android Studio terminals opened earlier keep the old PATH.

echo $PATH | tr ':' '\n' | head -n 5

2Fix

Close and reopen all zsh sessions in your terminal apps and IDEs. The Flutter docs give this as the step after editing the file.

# quit Terminal and the IDE completely, then open them again

3Verify

The first PATH entry is your Flutter bin folder, and the version command works.

flutter --version

Confirmed by docs.flutter.dev

Did this fix it?

Cause 3 of 3

The path in the export line does not match where the SDK really is

1Check

The docs ask for the absolute path of the folder you extracted the SDK into. A moved folder, a different name or a typo makes the entry point at nothing.

grep -n "export PATH" ~/.zprofile
ls "$HOME/develop/flutter/bin/flutter"

2Fix

Edit the line so it names the folder that really contains bin/flutter, then open a new session.

export PATH="$HOME/path/to/flutter/bin:$PATH"

3Verify

The version command prints the Flutter and Dart versions.

flutter --version && dart --version

Confirmed by docs.flutter.dev

Did this fix it?

How do I stop it coming back?

  • Keep the SDK in one fixed folder under your home directory and do not rename it later.
  • Edit the PATH line in a single profile file instead of copying it into several.
  • After editing the profile, open a fresh terminal before testing.
  • In VS Code, use the Flutter extension's Locate SDK prompt if the editor cannot find the SDK.

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

Mobile apps

Google Play says the app does not support 16 KB memory pages

check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a

Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.

5 causes, each with a fix

Next step

Want this handled for good?

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