1

I have installed Flutter in my Ubuntu 20.04 LTS. I've even updated the path in the .bashrc file as shown below

export PATH="$PATH:/home/fredriq/flutter_dev/flutter/flutter/bin"
source $HOME/.bashrc

But when I type flutter in the terminal I get this output:

flutter: command not found

6 Answers 6

1

Exporting the path from the terminal is temporary.
Open .bashrc using Gedit and add it in manually.

gedit ~/.bashrc

Then at the very bottom, add this line:

export PATH="$HOME/flutter_dev/flutter/flutter/bin:$PATH"

Finally source .bashrc or close and reopen any open terminals

source ~/.bashrc
3
  • this is exactly what i did May 2, 2020 at 10:32
  • A quick fix, my example : cd /usr/local/bin/ && sudo ln -s /home/knudfl/tmp2/flutter/bin/flutter .... and the 'flutter' command is OK. May 2, 2020 at 12:25
  • Thank you so much, cd /usr/local/bin/ && sudo ln -s /home/knudfl/tmp2/flutter/bin/flutter worked May 2, 2020 at 22:08
1

The Flutter SDK snap package provides everything needed to develop Flutter apps on Ubuntu. There's no need to install a bunch of development dependencies. Simply install the Flutter SDK snap package and your favorite IDE and you're ready to start developing with Flutter.

To install Flutter SDK in Ubuntu open the terminal and type:

sudo snap install flutter --classic

You may also be interested in these two other Flutter snap packages.

  • flutter-gallery - a gallery of widgets and behaviors, plus demos and vignettes, all built with Flutter.
  • flutter-ui-challenges - awesome Flutter UIs for real world applications with codes, free to use in your next flutter application.

If your code editor of choice is Visual Studio Code, run the following commands:

snap install code --classic  
code --install-extension dart-code.flutter
1

You can install flutter by snap. Open Terminal and execute below command.

sudo snap install flutter --classic
0
  1. I propose you to run this command

    echo 'export ANDROID_HOME=~/Android/Sdk' >> ~/.bashrc
    echo 'export PATH=$ANDROID_HOME/tools:$PATH' >> ~/.bashrc
    echo 'export PATH=$ANDROID_HOME/platform-tools:$PATH' >> ~/.bashrc
    
  2. Check that the new path is indeed into the ~/.bashrc

    tail ~/.bashrc
    

Finally source .bashrc or close and reopen any open terminals

source ~/.bashrc

Feel free to follow this tutorial : https://medium.com/@Abdelkrim/install-flutter-on-ubuntu-20-04-lts-focal-fossa-65ca0f86e02e

1
  • 1
    okay but it already worked using knud larsen method but I'll have a look at it May 4, 2020 at 12:06
0

Install flutter by clicking on the link.

Run following commands then

cd ~/development
tar xf ~/Downloads/flutter_linux_2.0.6-stable.tar.xz
git clone https://github.com/flutter/flutter.git
git clone https://github.com/flutter/flutter.git -b stable
export PATH="$PATH:`pwd`/flutter/bin"

You directly install from snapd.

sudo snap install flutter --classic
0

The easiest way to install Flutter on Linux is by using snapd.

  1. open the terminal
  2. Copy-paste the command line **

$ sudo snap install flutter --classic

**

  1. Once the snap is installed, you can use the following command to display your Flutter SDK path **

$ flutter sdk-path

**

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .