Close this search box.

How To Install Flutter on Ubuntu 22.04

Table of Contents

Installing Flutter on Ubuntu 22.04 involves a series of steps to set up a powerful development environment for building cross-platform mobile applications. Flutter, a popular open-source UI software development kit by Google, allows developers to create natively compiled applications for mobile, web, and desktop from a single codebase. This guide will walk you through the process of installing Flutter on your Ubuntu 22.04 system, ensuring that you have all the necessary tools and dependencies in place. By the end of this tutorial, you will be ready to start building and deploying your Flutter applications on Ubuntu.


First, make sure you’ve set up a VPSie Account if you haven’t already, then proceed to Deploy the Ubuntu 22.04 server based on your specific needs.

Once the server is deployed, SSH into the command line interface. Before installing any packages, it’s essential to update your system’s package list to ensure you have access to the latest versions. Open a terminal and run the following command:

sudo apt-get update -y


Install Snap (if not already installed)

Ubuntu 22.04 comes with Snap pre-installed. However, if it’s not installed for some reason, you can install it using:


sudo apt install snapd


After the installation is complete, you can verify that Snap is installed and working correctly by checking its version:

snap --version


You should see output indicating the version of Snap that is installed.


Install Flutter

Use the following command to install Flutter via Snap:

sudo snap install flutter --classic



The –classic flag is necessary because Flutter requires classic confinement, which grants it full system access.



After the installation is complete, you need to set up Flutter. Run the following command to verify the installation and set up the environment:

flutter doctor



The flutter doctor command checks your environment and displays a report of the status of your Flutter installation. It may suggest additional software installations (e.g., Android Studio, Xcode, or additional dependencies).


Add Flutter to your PATH

Ensure that the Flutter SDK is in your system PATH. Snap usually handles this automatically, but you can manually add it if needed by adding the following line to your ~/.bashrc or ~/.zshrc file:

export PATH="$PATH:/snap/bin"

After adding this line, apply the changes using:

source ~/.bashrc


source ~/.zshrc

Validate Flutter Setup

Create and Run a Test Flutter Project:


Create a test project using the following command:

flutter create my_test_app


This command creates a new Flutter project named my_test_app.


Navigate to the Project Directory:


Move into the directory of the newly created Flutter project.

cd my_test_app


Run the test project:


This command builds and runs the Flutter application on the connected device or emulator. If everything is set up correctly, you should see the Flutter app running on the device or emulator.

flutter run



In conclusion, by following the outlined steps, you can ensure a smooth Flutter installation on Ubuntu 22.04, making it ready for seamless development. After installing Flutter via Snap and configuring your environment, it’s essential to verify the setup’s integrity.

Make a Comment
Share on
VPSie Cloud service

Fast and Secure Cloud VPS Service

For a month

The First 1 orders gets free discount today! Try Sign up on VPSie to get a chance to get the discount.