IDE 2.0 preferences.txt path?

Hi @ErfanDL

Advanced Settings GUI

Unlike Arduino IDE 1.x, Arduino IDE 2.x does not use a file named preferences.txt.

In order to change advanced settings of Arduino IDE 1.x, it was necessary to edit preferences.txt directly. The situation is much more user friendly in Arduino IDE 2.x. You can change all the advanced settings via the Arduino IDE GUI. Unlike the Arduino IDE 1.x preferences.txt file, where there was no way to know what the listed properties did and which supported many useful additional undocumented properties, the Arduino IDE 2.x advanced settings lists all the available settings and provides a description of each of them.

The way to access the Arduino IDE 2.x advanced settings is documented here:

https://github.com/arduino/arduino-ide/blob/main/docs/advanced-usage.md#advanced-settings

Please let me know if you have any questions or problems while using them.

Configuration File Paths

Now, even though it should not be necessary to edit the files directly as I explained above, you asked for their location and so I will answer your question.

Arduino IDE Settings

The settings that control the behavior of the Arduino IDE application are stored in a file named settings.json

Windows

C:\Users\<username>\.arduinoIDE\settings.json

(where <username> is your Windows username)

Linux

~/.arduinoIDE/settings.json

macOS

~/.arduinoIDE/settings.json

Custom Keyboard Shortcuts

You can configure custom keyboard shortcuts in Arduino IDE by selecting File > Advanced > Keyboard Shortcuts. These are stored in a file named keymaps.json

Windows

C:\Users\<username>\.arduinoIDE\keymaps.json

(where <username> is your Windows username)

Linux

~/.arduinoIDE/keymaps.json

macOS

~/.arduinoIDE/keymaps.json

Arduino CLI Settings

Much of the non-GUI functionality of Arduino IDE 2.x is provided by a helper tool named Arduino CLI. Its settings are stored in a file named arduino-cli.yaml

There is documentation of the available configuration keys here.

Windows

C:\Users\<username>\.arduinoIDE\arduino-cli.yaml

(where <username> is your Windows username)

Linux

~/.arduinoIDE/arduino-cli.yaml

macOS

~/.arduinoIDE/arduino-cli.yaml
2 Likes