How can I configure system environment variables to relocate libraries and other components to a folder at the root of the C: drive instead of within my profile for Arduino 2.0 and newer?
Hi @JBillos.
The paths are configured via a configuration file, not by environment variables.
I'll provide instructions you can follow to do that:
- Select File > Quit from the Arduino IDE menus if it is running.
All IDE windows will close. - Open the file at the following path in any text editor:
(whereC:\Users\<username>\.arduinoIDE\arduino-cli.yaml
<username>
is your Windows username) - In the content of the
arduino-cli.yaml
file, you will see some lines like this:
Adjust the paths configured in those fields to the paths you want the IDE to use.directories: data: c:\Users\<username>\AppData\Local\Arduino15 downloads: C:\Users\<username>\AppData\Local\Arduino15\staging user: c:\Users\<username>\Documents\Arduino
- Save the file.
- Move the files from the previous paths to the newly configured paths.
- Start Arduino IDE.
The path configured via the directories.data
field is where Arduino IDE stores the following files:
- The library and package index files used by Library Manager and Boards Manager
- The "built-in" libraries (e.g., Keyboard, Mouse, Servo).
- The boards platforms installed via Boards Manager
The path configured via the directories.downloads
field is where Arduino IDE stores the archive files that are downloaded when you install a library via Library Manager or a platform via Boards Manager.
The path configured via the directories.user
field is the Arduino IDE "sketchbook" folder, where libraries installed via Library Manager are stored, as well as being a convenient place to store your sketches.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.