Where are Arduino IDE, Libaries, and examples installed on Linux

I installed the IDE on my Linux Mint (19.3) computer and now I would like to browse the libraries and examples but I can not figure out where they are on my computer. I see I can open them from within the IDE, however, what I would like to do is open the *.h and *.C files and I can not find them. Or I am I wrong to assume a local copy is available look through? I can find the libraries I installed as extras but not the defaults that come with the IDE. Searching the subject only give results on how to install libraries.

1 Like

barriebarry:
I would like to browse the libraries and examples but I can not figure out where they are on my computer. I see I can open them from within the IDE, however, what I would like to do is open the *.h and *.C files and I can not find them.

It's a little bit tricky because they are stored in multiple locations:

  • Sketchbook: {sketchbook folder}/libraries. The sketchbook folder location can be found (or changed) at File > Preferences > Sketchbook location:. This is the location of libraries installed via Library Manager (Sketch > Include Library > Manage Libraries...) or Sketch > Include Library > Add .ZIP Library. You should also manually install libraries to that location.

  • IDE: {Arduino IDE install folder}/libraries. This is for the libraries included with the Arduino IDE installation. You should never install libraries to that folder because they will be lost when you update to a new IDE version.

  • Core: This is dependent on the current selection in Tools > Board. Location will depend on if you're using a hardware core bundled with the IDE, installed via Boards Manager, or manually installed to {sketchbook folder}/hardware. The best way to find it is to do:

  • File > Examples > SPI > BarometricPressureSensor (or any other SPI library example sketch)

  • Sketch > Show Sketch Folder - this will open the SPI/examples/BarometricPressureSensor folder inside of the current hardware core's libraries folder

To find any library do this:

  • File > Examples > open any example from the library you want to find
  • Sketch > Show Sketch Folder - this will open the example sketch folder inside of the library folder.

You can also enable the "Show verbose output during: compilation" preference in File > Preferences, compile, then check the output shown in the black console pane at the bottom of the Arduino IDE window. It's pretty verbose, but the library paths should be listed at the very bottom in an easy to see manner.

barriebarry:
Or I am I wrong to assume a local copy is available look through?

No, you're not wrong. All the code is there on your computer available for you to open up in a text editor, study, and even experiment with if you like.

Thanks for the quick response and many details. The best detail was enabling "Show verbose... " in preference and this pointed me to the install folder.... right where I left it! I unzipped it in my download folder and ran the install from there but it never occurred to me that this remained as my working application folder. So if I'm correct, to relocate this folder, say to /home/myApps folder, I would be better to un-install, move the unzipped package, then re-stall from its new home.

Enabling all compile messages was a good idea too and now I have some ideas why my code was giving strange results.

barriebarry:
Thanks for the quick response and many details.

You're welcome. I'm glad if I was able to be of assistance.

barriebarry:
So if I'm correct, to relocate this folder, say to /home/myApps folder, I would be better to un-install, move the unzipped package, then re-stall from its new home.

To be honest, on my Linux machines I never bother with the installer. I just extract the download and run the arduino executable and the IDE starts right up. I think I miss out on the desktop icon and MIME type for .ino files or something like that because I didn't run the installer. Maybe some

Probably one of the other forum members will able to give better advice about the ideal process of changing the Arduino IDE installation location on Linux. But I can tell you that it will work just fine if you only move the folder to any location you prefer.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.