How To Install Flutter on Linux Mint 22

Flutter has revolutionized cross-platform application development since its introduction by Google. This powerful, open-source UI toolkit enables developers to build beautiful, natively compiled applications for mobile, web, and desktop platforms from a single codebase. Linux Mint 22, being one of the most popular Ubuntu-based distributions, provides an excellent environment for Flutter development. The combination of Linux Mint’s stability and Flutter’s versatility creates an ideal setup for developing high-performance applications across multiple platforms.
Whether you’re building Android apps, iOS applications, Linux desktop software, or progressive web applications, Flutter streamlines the entire development process with features like hot reload, expressive widgets, and native performance. This comprehensive tutorial walks you through every step of installing Flutter on Linux Mint 22, from initial system preparation to creating your first Flutter project. By following this guide, you’ll have a fully functional Flutter development environment configured and ready for production-level app development.
Prerequisites and System Requirements
Before diving into the Flutter installation process, ensure your Linux Mint 22 system meets the necessary requirements. Your machine should have at least 2 GB of RAM, though 4 GB or more is recommended for optimal performance during development and compilation. The Flutter SDK itself requires approximately 2.5 GB of disk space, but you’ll need significantly more when accounting for IDE installations, Android SDK components, and your development projects.
A stable internet connection is essential throughout the installation process for downloading packages and dependencies. You’ll need a user account with sudo privileges to install system packages and configure your development environment. Basic familiarity with Linux terminal commands will help you navigate through the installation steps more efficiently. Additionally, decide which IDE you prefer—popular choices include Visual Studio Code, Android Studio, or IntelliJ IDEA, each offering robust Flutter development support.
Understanding Flutter Installation Methods
Flutter offers multiple installation approaches, each suited for different use cases and developer preferences. The snap installation method provides the quickest setup with a single command, but it offers less control over version management and SDK location. Manual installation from the official tarball is the most reliable method, giving you complete control over the SDK location and version selection. The git clone method suits developers who want bleeding-edge features and prefer managing versions through git branches.
For Linux Mint 22, manual installation is strongly recommended based on real-world developer experiences. While snap packages work on many systems, they can introduce compatibility issues and don’t integrate as seamlessly with system paths. Manual installation ensures you understand exactly where Flutter resides on your system and provides greater flexibility for future updates and configuration changes.
Step 1: Update Your Linux Mint 22 System
System updates are crucial before installing any new development tools. Open your terminal using Ctrl+Alt+T or through the application menu. Execute the following command to refresh your package repositories and retrieve the latest package information:
sudo apt update
This command contacts Ubuntu’s repositories and downloads the newest package listings. Next, upgrade any outdated packages on your system:
sudo apt upgrade
The upgrade process may take several minutes depending on how many packages require updates. If prompted about configuration file changes, carefully read the descriptions and choose the appropriate option based on whether you’ve made custom modifications. A fully updated system prevents potential conflicts with Flutter dependencies and ensures compatibility with the latest security patches.
Step 2: Install Required Dependencies
Flutter relies on several system libraries and tools to function correctly. These dependencies handle tasks ranging from file compression to version control and graphical rendering. Install all required packages with this comprehensive command:
sudo apt install curl git unzip xz-utils zip libglu1-mesa
Let’s break down what each package provides. The curl utility downloads files from remote servers and is used by Flutter’s internal tools. Git enables version control for your projects and is required by Flutter’s SDK management system. The unzip and xz-utils packages extract compressed archives in different formats. The zip tool creates compressed archives for app deployment. Finally, libglu1-mesa provides OpenGL support necessary for graphical rendering in Flutter applications.
After installation completes, verify that git was installed successfully by checking its version:
git --version
You should see output displaying the installed git version, confirming successful installation.
Step 3: Download Flutter SDK
Navigate to Flutter’s official website at flutter.dev using your preferred web browser. Click the “Get started” button and select the Linux platform. You’ll find multiple installation methods listed—scroll down to “Method 2: Manual installation” for the most reliable approach.
The download page displays the latest stable release of Flutter SDK. Flutter maintains several release channels: stable, beta, and dev. The stable channel contains thoroughly tested releases suitable for production applications and is the recommended choice for most developers. Click the blue download button to obtain the latest stable release tarball.
Alternatively, download directly from your terminal using wget or curl. The following command downloads Flutter using wget (replace the version number with the current stable version):
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.16.9-stable.tar.xz
The download file is typically around 1 GB, so download time varies based on your internet connection speed. Once downloaded, the file appears in your Downloads directory by default.
Step 4: Extract Flutter SDK to Appropriate Directory
Choosing the correct installation location is important for PATH configuration and system organization. Create a dedicated directory for development tools in your home folder. This keeps your development environment organized and makes PATH configuration straightforward:
mkdir -p ~/develop
The -p flag ensures the command succeeds even if the directory already exists. Now navigate to your Downloads directory where the Flutter tarball resides:
cd ~/Downloads
Extract the Flutter SDK to your newly created develop directory:
tar xf flutter_linux_3.16.9-stable.tar.xz -C ~/develop/
Replace the filename with your downloaded version if different. The tar command with the xf flags extracts the compressed archive. The -C option specifies the extraction destination. This process takes a few minutes as it extracts thousands of files comprising the Flutter SDK.
After extraction completes, verify the Flutter directory structure:
ls ~/develop/flutter/
You should see directories including bin, packages, examples, and various configuration files. The bin directory contains the Flutter executable and related tools that you’ll add to your system PATH.
Step 5: Add Flutter to Your System PATH
The PATH environment variable tells your system where to find executable programs. Adding Flutter to PATH allows you to run Flutter commands from any directory in your terminal. First, determine which shell you’re using:
echo $SHELL
Most Linux Mint users run bash by default, displaying /bin/bash. For bash users, you’ll modify the .bashrc file in your home directory. Add the Flutter bin directory to your PATH with this command:
echo 'export PATH="$HOME/develop/flutter/bin:$PATH"' >> ~/.bashrc
This command appends the export statement to your .bashrc file, which runs every time you open a new terminal. The $HOME variable automatically expands to your home directory path, making the configuration portable. If you installed Flutter to a different location, adjust the path accordingly.
For zsh users (if you’ve changed your default shell), modify .zshrc instead:
echo 'export PATH="$HOME/develop/flutter/bin:$PATH"' >> ~/.zshrc
Apply the changes to your current terminal session without restarting:
source ~/.bashrc
Verify that Flutter is now in your PATH by checking which Flutter executable your system finds:
which flutter
The output should display the path to your Flutter installation, such as /home/yourusername/develop/flutter/bin/flutter. If the command returns nothing, double-check your PATH configuration and ensure you ran the source command.
Step 6: Run Flutter Doctor
Flutter includes a diagnostic tool called Flutter Doctor that analyzes your system configuration and identifies missing dependencies. Run this essential command:
flutter doctor
The first execution triggers Flutter’s initial setup process, which may take a minute. Flutter Doctor then scans your system and presents a detailed report. The output displays checkmarks for properly configured components and warning indicators for missing elements.
Common warnings include missing Android toolchain, Chrome not being installed, or Android Studio absent from your system. Don’t worry—many of these warnings are normal at this stage. If you only plan to develop Linux desktop applications, you can safely ignore Android-related warnings. For web development, you’ll need Chrome or Chromium installed.
For more detailed diagnostic information, run Flutter Doctor in verbose mode:
flutter doctor -v
This verbose output shows exact version numbers, installation paths, and additional system information helpful for troubleshooting. Review each section carefully and note which components require attention based on your development targets.
Step 7: Install Android Studio (Optional but Recommended)
While Android Studio is technically optional, it’s highly recommended for comprehensive Flutter development, especially if you’re targeting Android devices. Android Studio bundles the Android SDK, emulator support, and powerful debugging tools.
Install Android Studio using snap for the simplest installation:
sudo snap install android-studio --classic
The --classic flag grants Android Studio necessary system permissions. Installation takes several minutes as the package is quite large. Launch Android Studio after installation completes:
android-studio
The first launch triggers Android Studio’s setup wizard. Follow the wizard through its steps, which include downloading the Android SDK, platform tools, and build tools. Accept the default installation locations unless you have specific requirements.
After the wizard completes, accept Android SDK licenses required for development:
flutter doctor --android-licenses
This command presents each Android SDK license agreement. Type y and press Enter to accept each license. Once all licenses are accepted, Flutter Doctor will no longer show Android licensing warnings.
If you plan to use Android emulators for testing, configure a virtual device through Android Studio’s AVD Manager. Navigate to Tools > AVD Manager and create a new virtual device. Select a device definition and system image—Pixel devices with the latest Android version work well for testing.
Step 8: Install Flutter and Dart Plugins
IDE plugins significantly enhance your Flutter development experience with code completion, debugging support, and integrated tools. For Android Studio users, open the application and navigate to File > Settings (or Android Studio > Preferences on some systems).
In the Settings dialog, select Plugins from the left sidebar. Click the Marketplace tab and search for “Flutter”. Click the Install button next to the Flutter plugin. The Dart plugin installs automatically as a dependency of Flutter. Restart Android Studio when prompted to activate the plugins.
After restarting, configure the Flutter SDK path. Go to File > Settings > Languages & Frameworks > Flutter. Set the Flutter SDK path to your installation directory, such as /home/yourusername/develop/flutter.
For Visual Studio Code users, launch VS Code and open the Extensions view by pressing Ctrl+Shift+X. Search for “Flutter” and install the official Flutter extension published by Dart Code. This extension automatically includes Dart language support. VS Code detects your Flutter SDK location automatically if it’s properly configured in your PATH.
Step 9: Set Up Additional Development Targets
Flutter’s true power lies in its cross-platform capabilities. Enable web development support with this command:
flutter config --enable-web
This configuration allows Flutter to compile applications for web browsers. Install Chrome or Chromium for web application testing:
sudo apt install chromium-browser
For Linux desktop application development, install additional development libraries. These packages provide necessary headers and tools for compiling native Linux applications:
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
Let’s understand these dependencies. Clang is a C/C++ compiler required for building native code. CMake manages the build process across different platforms. Ninja is a fast build system that speeds up compilation. The pkg-config tool helps locate installed libraries. GTK3 development libraries provide the foundation for Linux UI rendering. Finally, lzma and standard C++ libraries support compression and core functionality.
Enable Linux desktop support in Flutter:
flutter config --enable-linux-desktop
This command activates Flutter’s Linux desktop target, allowing you to build and run applications directly on your Linux Mint system.
Step 10: Verify Flutter Installation
Perform a final comprehensive check of your Flutter installation. Run Flutter Doctor again to see the current status:
flutter doctor -v
A successful installation shows checkmarks for Flutter, development toolchains you’ve configured, and connected devices. Check your Flutter version to confirm proper installation:
flutter --version
This displays your Flutter version, Dart version, DevTools version, and the specific channel you’re using. The output should indicate the stable channel unless you deliberately chose a different release track.
Verify Dart installation separately:
dart --version
Dart comes bundled with Flutter and should report a version compatible with your Flutter installation. Test that Flutter commands work from any directory by navigating to your home folder and checking Flutter’s help:
cd ~
flutter --help
If this command displays Flutter’s help information, your PATH configuration is correct and Flutter is globally accessible.
Creating Your First Flutter Project
Now that Flutter is fully installed, create your first project to verify everything works correctly. Use Flutter’s create command to generate a new project:
flutter create my_first_app
This command scaffolds a complete Flutter application with example code. The process takes a moment as Flutter generates necessary files and fetches dependencies. Navigate into your new project directory:
cd my_first_app
View available devices where you can run your application:
flutter devices
This lists all configured targets including Linux desktop, web browsers, and any connected Android devices or running emulators. To run your app on Linux desktop:
flutter run -d linux
Flutter compiles your application and launches it in a native window. The default app is a simple counter that increments when you press a button. Try Flutter’s famous hot reload feature by making a change to the code while the app runs, then pressing ‘r’ in the terminal.
For web development, run your app in Chrome:
flutter run -d chrome
Flutter compiles your application to JavaScript and opens it in a browser window. The same application runs seamlessly across both desktop and web targets, demonstrating Flutter’s cross-platform capabilities.
Configuring IDE for Optimal Flutter Development
IDE configuration significantly impacts your development productivity. In Visual Studio Code, install additional helpful extensions beyond the Flutter plugin. The “Awesome Flutter Snippets” extension provides quick code templates. “Flutter Widget Snippets” offers shortcuts for common widgets. The “Dart Data Class Generator” automates boilerplate code creation.
Configure VS Code’s settings for optimal Flutter development by opening settings (Ctrl+,) and searching for Flutter-related options. Enable format-on-save to automatically format your code according to Dart conventions. Set up keyboard shortcuts for frequently used Flutter commands like hot reload and restart.
In Android Studio, customize your development environment through File > Settings > Editor. Enable code folding for widget trees to manage complex UI hierarchies. Configure the Flutter plugin’s hot reload behavior and error reporting preferences. Set up useful keyboard shortcuts—especially for widget wrapping and extraction, which you’ll use frequently.
Both IDEs support Flutter DevTools, a powerful suite of debugging and profiling utilities. Launch DevTools through your IDE’s debugging interface or by running flutter pub global activate devtools followed by flutter pub global run devtools.
Common Installation Issues and Troubleshooting
Even with careful following of instructions, you might encounter issues. If Flutter commands aren’t recognized after adding to PATH, ensure you restarted your terminal or ran the source command. Check that the export statement in your shell configuration file has the correct path without typos.
Android toolchain errors typically indicate missing Android SDK components or unaccepted licenses. Run flutter doctor --android-licenses and accept all agreements. If Android Studio installed to a non-standard location, set the ANDROID_SDK_ROOT environment variable pointing to your SDK directory.
Permission denied errors during installation suggest you need sudo privileges. However, avoid running Flutter itself with sudo—only system package installations require elevated privileges. If you extracted Flutter to a system directory requiring root access, move it to your home directory instead.
Chrome-related warnings appear if Chromium isn’t installed or isn’t in your PATH. Install Chromium through apt as shown earlier, or download Chrome from Google’s website. Flutter automatically detects Chrome once properly installed.
Network issues during SDK downloads can stem from firewall restrictions or proxy requirements. If behind a corporate firewall, configure proxy settings using flutter config --proxy-host and --proxy-port flags. For persistent download failures, manually download the SDK from a different network and transfer it to your development machine.
Dependency conflicts occasionally arise if you have incompatible library versions installed. Run sudo apt --fix-broken install to resolve package dependency issues. Check /var/log/apt/ logs for detailed error information if problems persist.
Best Practices for Flutter Development on Linux Mint
Maintaining your Flutter installation ensures optimal performance and access to latest features. Update Flutter regularly using:
flutter upgrade
This command fetches the latest stable release and updates your SDK. Flutter handles the upgrade process automatically, including Dart updates and tool improvements.
For projects requiring specific Flutter versions, consider using Flutter Version Management (FVM). This tool allows multiple Flutter versions to coexist and switch between them per project. Install FVM and manage versions independently without affecting your system-wide installation.
Organize your Flutter projects in a dedicated directory structure. Create a ~/projects/flutter/ folder to keep your applications separate from the SDK. Use meaningful project names and maintain consistent folder organization.
Run flutter doctor periodically to catch configuration drift or missing updates. Clean your project build cache occasionally using flutter clean to resolve build issues and free disk space. Use flutter pub cache repair if you encounter package dependency problems.
Performance optimization on Linux benefits from proper resource allocation. Close unnecessary applications during large compilations to free RAM. If experiencing slow builds, consider increasing swap space or upgrading physical memory.
Leverage Flutter DevTools for performance profiling and debugging. These tools help identify performance bottlenecks, memory leaks, and UI rendering issues. Regular profiling during development prevents performance problems in production.
Alternative Installation: Using Snap (Quick Method)
For developers wanting the fastest installation, snap offers a streamlined approach. Install Flutter with a single command:
sudo snap install flutter --classic
Snap automatically handles dependencies, PATH configuration, and updates. The --classic flag gives Flutter necessary system access for development tools. After installation completes, run flutter doctor immediately to verify setup.
Snap’s automatic update system keeps Flutter current without manual intervention. However, this can occasionally cause issues if updates introduce breaking changes to your projects. Snap also places Flutter in /snap/ directory structure, which some developers find less intuitive than manual installation locations.
The snap version sometimes lags behind the latest stable release by a few days. For developers needing cutting-edge features or specific versions, manual installation provides better control.
Alternative Installation: Using Git Clone
Developers preferring git-based workflows can clone Flutter directly from its repository. First, ensure git is installed, then clone the stable branch:
git clone https://github.com/flutter/flutter.git -b stable ~/develop/flutter
This downloads the Flutter repository into your specified directory. The -b stable flag checks out the stable release branch. Add Flutter to your PATH exactly as described in the manual installation method.
Git-based installation enables easy channel switching. Change to the beta channel using:
flutter channel beta
flutter upgrade
Switch back to stable anytime with flutter channel stable. This flexibility helps when testing new features or troubleshooting version-specific issues.
Update your git-cloned Flutter using standard Flutter commands—the flutter upgrade command performs git pulls automatically. This method combines Flutter’s built-in update mechanism with git’s powerful version control capabilities.
Congratulations! You have successfully installed Flutter. Thanks for using this tutorial for installing Flutter on Linux Mint 22 system. For additional help or useful information, we recommend you check the Flutter website.