1

I want to install the Flutter SDK on an Ubuntu system for all users. However, e.g. https://docs.flutter.dev/get-started/install/linux shows me how to do that only for a specific user. Since Flutter needs a lot of disk space, I would prefer installing it like any other program in /usr or /opt.

But how does one do that? Apparently, Flutter needs write permissions to the directories where it was installed to at run time, and I need to avoid making the directories world-writable.

2 Answers2

1

After trying to install flutter myself and seeing which files needs write permission I recommend installing flutter in the user's home dir instead.

What I use in this case in order to save HDD space is a ZFS file system user/skeleton that I clone for each new user. The user/skeleton has all the SDK's installed. This has it's caveats though, so if you want a quick solution buy more HDD's. Or if you can upgrade RAM but not add more HDD's you could try a file system that supports de-duplication.

0

From the guide you linked to:

cd /opt

wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_2.10.1-stable.tar.xz

tar xf flutter_linux_2.10.1-stable.tar.xz

cd flutter/bin

pwd

Then add the location of flutter/bin to the PATH variable in /etc/profile.

Giacomo1968
  • 58,727