Installing
2. Setting Up Flatpak
How to Setup Flatpak on Ubuntu 21.04
3. Installing Arduino IDE
Then to Install Arduino IDE Flatpak App on Ubuntu 21.04
To setup the Repo play:flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
For further Insight see the Flatpak Official Documentation.
And after:flatpak install https://flathub.org/repo/appstream/cc.arduino.arduinoide.flatpakref
The Flatpak App Setup do Not need the sudo Command because then it Runs confined into a Sandbox.
However, you’ll be Prompted to Authenticate with your User or Admin Pass.
Then Confirm the proposed Setup with ‘Enter’ and wait until the App is Downloaded and Installed.