How to Install Flutter in Ubuntu (WITHOUT SNAP)

Reza Rachmanuddin
3 min readNov 21, 2021

--

Flutter logo

Many times when we are looking for a tutorial to install Flutter on Ubuntu, will be directed to use snapd. Just by executing one command, then Flutter will be installed and ready to use. Snap or snapd is very helpful for install some package or application.

Something easy is not necessarily the best

Yup, even by using snapd can make it easy for users, but I don’t recommend to make snapd as primary for install some package or application (in another article, I will tell you the reason).

Tutorial

1. Download Flutter SDK

Visit this link, to get the latest Flutter SDK. You can choose from Stable, Beta or Dev Channel, but I recommend download from Stable Channel to get stable version.

2. Extract it

You can using any application to extract it, or you can using TAR CLI (an archiving utility) like this :

tar xf flutter_linux_2.5.3-stable.tar.xz

After extracted, you will see flutter folder.

3. Move flutter folder to lib folder

Actually you can save the flutter folder anywhere, but I think, it will be more structured when we save it in to lib folder.

sudo mv flutter /usr/lib

Check the flutter folder has moved to lib folder or not using ls

ls -l /usr/lib | grep flutter

Flutter folder will showing like this, if moved successfully

Flutter folder showing

4. Try run flutter

Now, you can run flutter with call flutter file on folder /usr/lib/flutter/bin

/usr/lib/flutter/bin/flutter
Trying to run flutter

If you get some error regarding permission, you can change ownership of flutter folder using chown

sudo chown -R $(whoami) /usr/lib/flutter
  • whoami will return your username
  • -R make recursive operation

If you have any error when try to run flutter, leave in the comment for detail of the error, perhaps we all can help you together

5. Add PATH of /flutter/bin folder

It will be very inconvenient when we want to run flutter we have to type /usr/lib/flutter/bin/flutter . So, we can make it more simple with add PATH of flutter folder to your bash config file.

Usually, the config file of bash have name .bashrc, so you can add to it, or if their any file with name .profile you can also add to it.

You can add PATH using echo, like this :

echo "export PATH=$PATH:/usr/lib/flutter/bin" >> ~/.bashrc
source ~/.bashrc

Or

echo "export PATH=$PATH:/usr/lib/flutter/bin" >> ~/.profile
source ~/.profile

You can check with type flutter in anywhere, and it will be showing the result same as before.

Conclusion

We have successfully installed Flutter without Snap, and also set path for flutter, so we can using flutter only typing flutter anywhere. I hope my explanation is easy to understand, and useful for many people.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Reza Rachmanuddin
Reza Rachmanuddin

Written by Reza Rachmanuddin

Biarkan linter yang merapihkan segalanya

No responses yet

Write a response