The Arduino IDE for Linux is available as a snap package. Snaps are packages of software that contain all their dependencies necessary to run on any Linux distribution. After installing Snaps they update automatically, so no worry. The only disadvantage of Snaps may be the size of an installed application versus one installed from a native package repository (if available) because for each Snap all dependencies are installed even if you already have some in other Snap. But it works out of the box…
Practically you can follow this steps for any Linux distribution not only Ubuntu. I have put Ubuntu in title becose i’ll do it on my Ubuntu laptop
$ sudo snap install arduino
Run the Arduino IDE. There are two ways, either from CLI by just typing arduino
or by finding it in your applications listing in your Desktop environment that you use.
Hope it’s useful to somebody!