Using TerminalFlutter SDK allows developers to build apps for mobile, web, and desktop from one codebase.
How to Install Flutter in Ubuntu Using Terminal?
Flutter SDK allows developers to build apps for mobile, web, and desktop from one codebase.
Flutter uses Dart language. Developers create natively compiled applications. Google maintains Flutter.
Key Points
- Research shows Flutter works on Ubuntu 20.04 and later versions.
- Steps include package installation, SDK download, extraction, path setup, and verification.
- Evidence points to manual terminal method as reliable for control.
Prerequisites
Install required system packages first. Update system repositories.
Installation Steps
- Open terminal.
- Run sudo apt update && sudo apt upgrade -y.
- Install tools with sudo apt install -y curl git unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev.
Verification
Run flutter doctor after setup.
- What is Flutter?
- Flutter is an open-source UI toolkit from Google for creating apps on multiple platforms.
- What Ubuntu version supports Flutter?
- Ubuntu 20.04 LTS and higher versions support Flutter installation.
- Does Flutter require Android Studio?
- Flutter needs Android Studio for mobile app development on Android devices.
Flutter installation on Ubuntu requires terminal commands to download SDK, extract files, and set path under 10 steps total.
How to Install Required Packages?
Run sudo apt install -y curl git unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev.
These packages include curl for downloads, git for version control, unzip for archives. Developers need them for Flutter desktop apps.
Update system first with sudo apt update && sudo apt upgrade -y.
How to Download Flutter SDK?
Run wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.22.2-stable.tar.xz.
This command fetches stable version 3.22.2. Check Flutter archive for latest release.
Save file in Downloads folder.
How to Extract Flutter Files?
Run tar xf ~/Downloads/flutter_linux_3.22.2-stable.tar.xz C ~/development.
This creates development folder if absent. Files go to ~/development/flutter.
Create folder manually with mkdir ~/development if needed.
How to Add Flutter to Path?
Add export PATH=”$PATH:$HOME/development/flutter/bin” to ~/.bashrc file.
Open file with nano ~/.bashrc. Paste line at end. Save changes.
Run source ~/.bashrc to apply.
This allows terminal access to flutter commands.
How to Verify Flutter Setup?
Run flutter doctor.
This checks installation. It reports missing items.
Fix issues as shown, like install Chrome for web apps.
There are 5 common outputs from flutter doctor, like Flutter version, Dart version, connected devices.
Flutter Doctor Outputs Table
Component | Status Example | Action if Missing |
---|---|---|
Flutter | Version 3.22.2 | Download again |
Android toolchain | Installed | Install Android SDK |
Chrome | Installed | Add for web support |
Linux toolchain | Installed | Add desktop packages |
Connected device | Available | Connect emulator |
How to Create First Flutter App? https://docs.flutter.dev/get-started/install/linux/desktop
Run flutter create my app && cd my app && flutter run.
This builds sample app. It runs on Linux desktop.
Use flutter run d chrome for web.
Developers test code with flutter test.
- How long does installation take? Installation takes 5 to 10 minutes on standard connection.
- Can Flutter build Android apps? Flutter builds Android apps with installed SDK.
- What IDE works with Flutter? Visual Studio Code works with Flutter extension.
Flutter setup on Ubuntu enables app creation for Android, iOS, web, Linux, macOS, Windows – one codebase.
Flutter installation on Ubuntu requires terminal commands to download SDK, extract files, and set path under 10 steps total.
How to Install Required Packages?
Run sudo apt install y curl git unzip xz utils zip libglu1-mesa clang cmake ninja build pkg config libgtk 3 dev liblzma-dev libstdc++ 12 dev.
These packages include curl for downloads, git for version control, unzip for archives. Developers need them for Flutter desktop apps.
Update system first with sudo apt update && sudo apt upgrade -y.
How to Download Flutter SDK?
Run wget https://storage.googleapis.com/flutter infra release/releases/stable/linux/flutter linux 3.22.2-stable.tar.xz.
This command fetches stable version 3.22.2. Check Flutter archive for latest release.
Save file in Downloads folder.
How to Extract Flutter Files?
Run tar xf ~/Downloads/flutter_linux_3.22.2-stable.tar.xz -C ~/development.
This creates development folder if absent. Files go to ~/development/flutter.
Create folder manually with mkdir ~/development if needed.
How to Add Flutter to Path?
Add export PATH=”$PATH:$HOME/development/flutter/bin” to ~/.bashrc file.
Open file with nano ~/.bashrc. Paste line at end. Save changes.
Run source ~/.bashrc to apply.
This allows terminal access to flutter commands.
How to Verify Flutter Setup?
Run flutter doctor.
This checks installation. It reports missing items.
Fix issues as shown, like install Chrome for web apps.
There are 5 common outputs from flutter doctor, like Flutter version, Dart version, connected devices.
Flutter Doctor Outputs Table
Component | Status Example | Action if Missing |
---|---|---|
Flutter | Version 3.22.2 | Download again |
Android toolchain | Installed | Install Android SDK |
Chrome | Installed | Add for web support |
Linux toolchain | Installed | Add desktop packages |
Connected device | Available | Connect emulator |
Key Citations: