Hi Guys, Welcome to Proto Coders Point. In this Article we’ll learn How to install flutter in ubuntu 20.04.
Install Flutter in Ubuntu 20.04/ Linux
System Requirement to Install Flutter in ubuntu
To install and run Flutter on ubuntu, your development system environment must meet these minimum requirements:
- Operating Systems: Linux (64-bit)
- Disk Space: 600 MB (does not include disk space for IDE/tools).
- Tools: Flutter depends on these command-line tools being available in your environment.
bash
curl
git
2.xmkdir
rm
unzip
which
xz-utils
Download flutter SDK for Linux/ubuntu
Flutter_Linux_Ubuntu_v1.9.1+hotfix.4-stable.tar.xzAfter Downloading flutter dart sdk from above gived button, Change your current directory using cd command where the flutter_linux_stable.tar.xz is located ( May be in Downloads Directory )
cd Downloads
After Download Complete Extract the flutter_linux_stable.tar.xz file in you selected directory using below command.
tar xf ~/Downloads/flutter_linux_v1.9.1+hotfix.4-stable.tar.xz
Add the flutter
tool to your path:
export PATH="$PATH:`pwd`/flutter/bin"
Note: Above command will sets your PATH
variable for the current terminal window only. Means when you you close the terminal you no longer will be able to use flutter, to use again you need to user again and again export PATH ( above command ).
To permanently add Flutter to your path, see Update your path.
Add Flutter to environment variable in Ubuntu
Now you can add the flutter binaries to your PATH, either by running this in your terminal:
export PATH="$PATH:`pwd`/flutter/bin"
But this comment will temporary add flutter binaries in PATH variable, you can permanently add it to the configuration file of your shell permanently.
Depending on which shell you use either ~/.bashrc
for bash~/.zshrc
for zsh , these will typically be:
bash your can proceed steps to add flutter binaries in PATH variable
open the hidden file ~/.bashrc
using command:
gedit ~/.bashrc
A gedit will pop up with a window like below. just scroll down still you reach at the bottom and paste the below code.
export PATH="$PATH:/home/$USER/flutter/bin"
Adding export PATH in .bashrc file – add flutter to path ubuntu
You can reload your config by running:
source ~/.bashrc
Now close the current terminal or restart the terminal.
How to check if flutter is correctly installed in the system.
flutter doctor
Installing Flutter Plugin in android studio
Check out this post installing flutter SDK + android studio with Flutter plugin