How to use Arduino on a portable version of Linux

Good afternoon, I’m writing this post in case anyone has run into any issues using the portable version of Arduino for Linux. I know it’s not a very common setup; in fact, I’m writing this because I haven’t been able to find a solution anywhere else, so I’m posting it here in case anyone else has the same problem—here’s the solution. I should mention that I use Arch Linux (I use arch btw), so I don't know if other distributions will have the same issue.

To use the portable version of Arduino for Linux, you need to do a few things:

First, download the portable version for Linux (.zip) from the website:

https://www.arduino.cc/en/software/

Then extract it to the folder where you want to use it.

IMPORTANT: On Linux, for security reasons, the system often cannot run executables from a USB drive. This is because the USB drive’s file system is mounted with the noexec option. Therefore, it’s best to copy the entire folder to a location on your computer.

After that, in the terminal, navigate to the folder containing the executable and try running it with:

./arduino-ide (or whatever name the executable currently has)

sudo ./arduino-ide

If that doesn’t work, try granting permissions with chmod +x arduino-ide

After that, repeat the previous steps. If you still get permission error messages or messages saying the command cannot be found, it’s for the reason I mentioned.

To fix this, you need to copy the folder you extracted to a location on your computer's hard drive (or extract it again directly on your computer) and follow the same steps as before. It's important to run the chmod command in case you encounter the errors mentioned earlier. After that, it should load.

One problem I’ve encountered—and that you’ll likely face as well—is that even if the Arduino IDE application opens, it will keep loading. If you look at the terminal, you’ll see a message like this:

daemon INFO Starting daemon from /home/yourUsername/FoldersWhereYourArduinoVersionIsLocated/arduino-ide_2.3.8_Linux_64bit/resources/app/lib/backend/resources/arduino-cli...

daemon ERROR Error: spawn /home/yourUser/FoldersWhereYourArduinoVersionIsLocated/arduino-ide_2.3.8_Linux_64bit/resources/app/lib/backend/resources/arduino-cli EACCES

That’s because when you try to open the application, it also has to load that executable, and just like before, it doesn’t have permission to run it on the disk. You need to go to the folder containing that executable and grant it the necessary permissions:

Close the Arduino application

Go to this folder:

cd /home/yourUsername/FoldersWhereYourArduinoVersionIsLocated/arduino-ide_2.3.8_Linux_64bit/resources/app/lib/backend/resources/

Grant the necessary permissions:

chmod +x arduino-cli

From this point on, the application should open, and you should be able to start working with it.
Honestly, even though I use Linux for almost everything, I recommend programming on Windows for this project—as much as it pains me to say so. It’s less of a headache, and you’ll likely run into fewer issues this way. But if you want to develop the application and then, at a later time, simply switch to Windows to upload the program, that could be an option.

Do you mean the old IDE 1.n.n?

Thanks for taking the time to share your findings @m1ch3lc4m.

We recommend against running Arduino IDE with root permissions. There is always a more granular solution to granting additional permissions when required. Running applications as superuser is not a good security practice.

Do you have the AppArmor security software installed?

I'm referring to the latest version released, Arduino IDE 2.3.8

Thanks for the advice. I know it's not a good idea to run applications as sudo, but for now, it's the only option I've found for this version.

No, I don't have AppArmor installed on my system.

OK, I asked because we sometimes see people use the chmod solution as a workaround for AppArmor preventing Arduino IDE from starting (AppArmor is part of the Ubuntu distro, so many Linux users do encounter this):

In that case, the better solution is to create AppArmor policy for Arduino IDE. However, that solution obviously isn't applicable in this case.

Unfortunately I don't have any experience with Arch, so I'm not well equipped to advise on Arch-specific problems.


What is the error message you see printed in the terminal if you try starting Arduino IDE normally without sudo?

So, when I tried to open the program for the first time, it told me I didn't have sufficient permissions to run it, so I tried setting the permissions using chmod. After that, the application opened but kept loading; then a message appeared in the terminal saying it was trying to run the arduino-cli program and that it didn't have sufficient permissions either. So I also tried granting permissions using chmod, and after that I was able to run it.

I did install Manjaro (I know not quite Arch) about a month ago and can't remember having to jump through all kinds of hoops to get the zip install working; and definitely I did not have to give special permissions to the arduino-cli (I would have remembered that).

Note: the zip is not equivalent to a portable install (which is only possible with IDE 1.x).

That's not portable.

So you’re sharing issues with portable Arduino IDE on Linux (especially Arch) and how to fix those permission errors, yeah this is a pretty common thing. It usually happens because the executables don’t have proper run permissions or the USB is mounted with noexec. Your fix using chmod +x for both arduino-ide and arduino-cli is actually correct, a lot of people miss that second step. Also moving it to local storage instead of USB helps avoid those restrictions, so overall your approach makes sense just bit messy to setup at first.

I installed IDE 2.3.8 on Linux mint no problems, works great! I just followed the simple Arduino install instructions, very easy.

I have Linux Mint Live USB, and see Arduino IDE on its Software Manager list, with a size of 500MB. I am certain it will run on USB, just as Libre Office executables (and many more).