FlutterBasic 2 min read

Install Flutter on macOS or Linux: shell PATH and SDK selection

Extract the correct host SDK, configure the shell environment, verify executable selection and distinguish host setup from platform setup.

On this page

The important shell setup question is which Flutter executable a new terminal resolves. A correct installation can still appear broken when the current shell or editor selects an old SDK.

Step 1: download for your host

Use the official installation guide to choose the OS and architecture. On macOS, distinguish Apple Silicon and Intel bundles. On Linux, check the current distribution requirements for the targets you intend to build.

Extract the entire SDK to a writable development location. Do not combine files from different releases, and do not put the SDK inside a single app’s source directory.

Step 2: configure the shell that you actually use

Inspect your active shell and the shell’s startup documentation before choosing a profile file. A zsh configuration file is not automatically read by bash, and graphical editors can inherit a different environment from a terminal.

The following line illustrates adding a chosen SDK location. Replace the example location with your own; append it appropriately in the correct shell profile instead of overwriting unrelated settings.

export PATH="$HOME/development/flutter/bin:$PATH"

Open a new terminal after updating the profile. Running an export in one terminal can fix that session without updating future terminals or your editor, so verify both cases.

Step 3: inspect the selected tools

which flutter
which dart
flutter --version
dart --version
flutter doctor -v

Compare the returned path with the directory you extracted. If a version manager supplies the executable, follow its project-selection rules rather than adding competing PATH entries blindly.

Step 4: configure target-specific tools

For Android, install and select the Android SDK tools described in Android setup . On macOS, use iOS setup if you intend to build for iPhone or iPad. Linux cannot substitute for the macOS/Xcode iOS toolchain.

Desktop targets also have their own build dependencies. Check the relevant official setup page instead of assuming a successful Dart command proves the full desktop toolchain is present.

Step 5: verify the baseline

Create and run a clean sample using the local project guide . Record the SDK path and selected target. If an existing app then fails, compare its configuration with the known-working sample before changing the SDK again.

How this topic connects

Understand first

Apply it next

Lesson progressMark complete after checking the example and exercise.

Find your next idea

Search lessons, code examples and projects.

Type a few words to start exploring.