Installing & Setting up Flutter on Linux from Source
This guide provides step-by-step instructions to install and set up Flutter on Linux from source. It is primarily targeted at Debian-based distributions but should work for the majority of them.
Update your system by running the following command:
Install the necessary packages using the command:
Optionally, you can choose to install cmake and ninja-build from source. This step is not recommended but provided for advanced users. You can download cmake from here and ninja-build from here. Note that installing cmake is required to install ninja-build or Python.
Create a new folder for Flutter by running the following command:
Download the latest Flutter SDK tarball file
Installation
Change into the project folder you created earlier:
Extract the Flutter tarball file using the command:
Add Flutter to your environment PATH by executing the following command:
Optionally, you can add the PATH by opening the .bashrc file using the command:
Add the PATH configuration there.
Replace [path-to-flutter-directory] in the above command with the actual path to the folder where you extracted the Flutter SDK. For example, if you extracted Flutter in a folder called projectfolder, the command will be:
Save the file by pressing Ctrl+O and then Ctrl+X.
Reload Terminal Session
Reload your terminal session by either reopening the terminal or running the following command:
Check if the Flutter PATH is correctly added to your shell by running:
Once you have confirmed that Flutter is installed and the PATH is set, run the following command to check the Flutter version:
You should see a welcome screen along with the installed version of Flutter.
Last updated