UbuntuUbuntu Based

How To Install Flutter on Ubuntu 24.04 LTS

Install Flutter on Ubuntu 24.04

In this tutorial, we will show you how to install Flutter on Ubuntu 24.04 LTS. Ubuntu 24.04 LTS, codenamed “Noble Numbat,” is the latest long-term support release of the popular Linux distribution. With its stability, security, and user-friendly interface, Ubuntu 24.04 LTS has become a preferred choice for developers worldwide. Flutter, on the other hand, is an open-source UI software development kit created by Google, allowing developers to build natively compiled applications for mobile, web, and desktop platforms from a single codebase.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Flutter on Ubuntu 24.04 (Noble Numbat). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.

Prerequisites

  • A server running one of the following operating systems: Ubuntu and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies.
  • An Ubuntu 24.04 system with root access or a user with sudo privileges.

Install Flutter on Ubuntu 24.04 LTS Noble Numbat

Step 1. Updating the Package Repository.

To ensure a smooth installation process and avoid compatibility issues, it’s essential to update and upgrade your Ubuntu 24.04 LTS system to the latest available packages. Open a terminal and execute the following commands:

sudo apt update

This command will fetch the latest package information from the Ubuntu repositories, allowing you to install the most recent version of Flutter and its dependencies. Updating the package repository is crucial to maintaining the security and stability of your system.

Step 2. Installing Flutter on Ubuntu 24.04.

Snap is a package management system developed by Canonical, the company behind Ubuntu. It provides a convenient way to install and manage applications across different Linux distributions. To install Flutter using Snap, follow these steps:

sudo apt install snapd

Once Snap is installed, you can proceed with installing Flutter by executing:

sudo snap install flutter --classic

The --classic flag grants Flutter access to the system’s resources, which is necessary for proper functionality.

If you prefer not to use Snap, you can alternatively download the Flutter SDK from the official website and extract it to a desired location. However, using Snap simplifies the installation and update process.

Step 3. Configuring the Flutter Environment.

After installing Flutter, you need to set up the Flutter path to make it accessible system-wide. Follow these steps:

cd ~

Open the .bashrc file using a text editor, such as Nano:

nano .bashrc

Add the following line at the end of the file, replacing [PATH_TO_FLUTTER_SDK] with the actual path where you installed Flutter:

export PATH="$PATH:[PATH_TO_FLUTTER_SDK]/flutter/bin"

Save the changes and exit the text editor. If you’re using Nano, press Ctrl + X, then Y, and finally Enter, then reload the .bashrc file to apply the changes:

source .bashrc

To verify that Flutter is installed correctly, run the following command:

flutter doctor

This command checks your environment and displays a report of the status of your Flutter installation. It will guide you through any additional setup steps required, such as installing Android Studio or configuring your IDE.

To keep your Flutter installation up to date with the latest features and bug fixes, you can easily upgrade it using the following command:

flutter upgrade

This command will download the latest stable version of Flutter and update your existing installation. After upgrading, run flutter doctor to ensure that your development environment is still properly configured.

Congratulations! You have successfully installed Flutter. Thanks for using this tutorial for installing Flutter on the Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the Flutter website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button