Sub topic 2
Installing the Arduino IDE
This chapter covers installing the Arduino IDE on Windows, macOS, or Linux, and checking that the install works. It assumes you can install software on your operating system, have an administrator account or know how to get one, and know that a program is a list of instructions. You don't need a board connected yet. Later chapters cover the interface, the USB connection, and board selection.
What you are installing
The Arduino IDE (integrated development environment) is one application that combines a text editor, a compiler toolchain, and an uploader. You write a sketch (an Arduino program), and the IDE turns it into machine code for your board's microcontroller and sends it over USB.
Two generations of the IDE exist:
| Version | Status | Notes |
|---|---|---|
| Arduino IDE 2.x | Current | Built on the Eclipse Theia framework. It has autocomplete, a built-in debugger for supported boards, and a faster compile step. |
| Arduino IDE 1.8.x | Legacy | Simpler and lighter. It still works, but it is no longer the main download. |
This tutorial uses 2.x. Menu names are nearly the same in 1.8.x, so most steps carry over. Features such as autocomplete and live error markers are specific to 2.x.
The IDE is not the only way to work with Arduino. The Arduino CLI offers the same compile and upload features from a terminal, and the IDE uses it internally. The Arduino Cloud Editor runs in a browser. Use the desktop IDE when you want to work offline and keep your files on your own machine.
Before you download
Check three things first.
- Your operating system version. Arduino IDE 2.x needs a reasonably recent system. The download page lists the current minimums. If your system is older than those, install a 1.8.x release instead.
- Disk space and permissions. The IDE itself is a few hundred megabytes. Board packages and libraries add more over time, and a package for a larger board family can take hundreds of megabytes. Make sure you have a few gigabytes free.
- Where the files will go. The IDE keeps your sketches in a folder named
Arduinoinside your Documents folder by default. If your Documents folder is synced by a cloud service, or sits on a network drive, builds can slow down or fail with file-lock errors. Consider moving the sketchbook location later in the IDE's preferences.
Download the installer only from the official site, arduino.cc/en/software. Third-party download sites often bundle adware or offer outdated builds.
Installing on Windows
Windows offers three downloads:
- Windows Win 10 and newer, 64 bits is an installer (
.exe). It is the best choice for most users. - Windows MSI installer suits administrators who deploy software to many machines.
- Windows ZIP file is a portable copy. You unpack it anywhere and run it without installing.
To use the installer:
- Run the downloaded
.exe. - Accept the license agreement.
- Choose whether to install for all users or only for your account. The all-users option needs administrator rights.
- Keep the default install folder unless you have a reason to change it.
- Click Install.
During installation, Windows may show a prompt to install device drivers. Accept it. These drivers let Windows recognize Arduino boards when you plug them in. Without them, the board may appear as an unknown device and no serial port will be available. If you decline the prompt, you can reinstall later and accept it.
Windows SmartScreen may warn you about an unrecognized app. Check that the publisher is Arduino before you continue.
Installing on macOS
Download the macOS file for your processor. Apple silicon machines (M1 and later) and Intel machines may have separate builds, so check which chip you have under the Apple menu, in About This Mac.
- Open the downloaded
.dmgor.zipfile. - Drag Arduino IDE into your Applications folder.
- Open it from Applications. The first launch may show a message that the app was downloaded from the internet. Choose Open to continue.
Don't run the IDE directly from the Downloads folder or from the mounted disk image. macOS can run such apps in a restricted state, which causes odd errors later when the IDE tries to write files.
Installing on Linux
Linux offers three formats:
- AppImage is a single file that runs on most distributions.
- ZIP file is an unpacked folder.
- Arduino CLI is a separate download and does not include the graphical IDE.
For the AppImage, make the file executable and run it:
chmod +x arduino-ide_*_Linux_64bit.AppImage
./arduino-ide_*_Linux_64bit.AppImageSome distributions block AppImages that use a sandbox feature. If the IDE exits immediately, start it from a terminal to read the error. A common one mentions the chrome-sandbox file or user namespaces. Running it with the --no-sandbox flag works around the problem, but it turns off a security feature, so use it only if you trust the download.
Serial access is the most common Linux problem. A board connects as a device file such as /dev/ttyACM0 or /dev/ttyUSB0. These files belong to a group, usually dialout on Debian-based systems and Ubuntu, and uucp on Arch. If your user isn't in that group, the IDE can see the port but can't open it, and uploads fail with "permission denied".
Add yourself to the group, then log out and back in:
sudo usermod -a -G dialout $USERLog out and back in, because group changes apply only to new sessions. You can confirm the change with groups, which should list dialout.
On some distributions, a service called ModemManager briefly opens new serial devices and can interfere with uploads. If uploads fail intermittently, this is a known cause. Removing or disabling that service on a machine dedicated to development is a common fix.
Some distribution packages of the IDE are old. Prefer the official download over a package from your system's software store.
First launch
When the IDE starts for the first time, it may do several things:
- Show a firewall prompt. Allow it. The IDE runs a local helper process for language features and uses the network to fetch board and library indexes.
- Offer to install extra components. Accept the defaults.
- Download package indexes, which are lists of the boards and libraries available for download. This needs an internet connection and can take a minute.
Wait until the status area at the bottom of the window stops showing activity before you continue. Starting work while the index is still loading can make the Boards Manager and Library Manager appear empty.
A new window opens with a sketch containing empty setup() and loop() functions. That means the editor works. You'll verify the build tools in the next section.
Verifying the install
A good check does not need a board. The IDE can compile for a board without having one connected.
- Open Tools > Board and choose Arduino Uno (under the Arduino AVR Boards group, if shown).
- Open File > Examples > 01.Basics > Blink. A new window opens with the Blink sketch.
- Click the Verify button (the check mark) in the toolbar.
The output panel at the bottom shows the compile steps. A successful build ends with a message like this:
Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.The exact numbers vary with the IDE and core version. What matters is that the build completes without an error. This confirms that the editor, the compiler, and the bundled board package all work.
If Arduino AVR Boards isn't listed, the package didn't install. Open the Boards Manager from the left sidebar and install Arduino AVR Boards. The next chapters cover that tool.
Where things are stored
Knowing the file locations helps when something goes wrong or you move to a new machine.
| Item | Typical location |
|---|---|
| Sketchbook (your sketches and your libraries) | `Documents/Arduino` |
| Board packages and tools | A per-user data folder, for example `AppData\Local\Arduino15` on Windows, `~/Library/Arduino15` on macOS, `~/.arduino15` on Linux |
| IDE settings | Inside the same per-user data folder and in the IDE's own settings files |
The sketchbook is the part to back up. The package and tool folders can be downloaded again, so deleting them is a safe way to recover from a corrupted install. The IDE downloads them again when needed.
A sketch lives in a folder with the same name as its main file. A sketch called Blink is stored as Blink/Blink.ino. If you rename one without the other, the IDE offers to fix it or refuses to open it.
What happens on a compile
Understanding the pipeline now makes the later upload chapters easier. When you click Verify, the IDE does the following:
- It combines the files in your sketch folder and adds the Arduino header files that give you functions such as
pinMode(). - It calls the compiler from the selected board package. For an Uno, this is a version of GCC that targets the AVR chip.
- It links your code with the Arduino core library, which provides the standard functions.
- It produces a file in a format ready to be sent to the board.
The compiler runs on your computer, but it produces code for a different processor. This is called cross-compiling, and it is why the board package matters: it holds the compiler for that board's chip.
Common installation problems
| Symptom | Likely cause | Fix |
|---|---|---|
| The installer finishes but the IDE won't start | Blocked by security software, or a damaged download | Download again from the official site, then allow the app in your security settings |
| Boards Manager or Library Manager is empty | Index still loading, or no network access | Wait for the status bar to settle, then check your connection and proxy settings |
| Verify fails with a "no such file" error in the temp folder | Antivirus software scans or removes build files | Add the Arduino data folder to your antivirus exceptions |
| Verify fails with a path error | Non-ASCII characters or very long paths in the sketch folder | Move the sketchbook to a short path with plain characters |
| Linux AppImage closes immediately | Sandbox restriction | Run from a terminal to read the error |
If you work behind a corporate proxy, set it in the IDE's preferences so that index downloads can succeed.
Updating the IDE
The IDE checks for updates and offers them when it starts. Updating is usually safe, but a few habits help.
- Update when you aren't in the middle of a project. A new version can bring new compiler versions that change warnings.
- Your sketchbook, installed packages, and libraries stay in place across updates.
- To keep a stable setup for a class or a long project, you can decline updates until you choose to apply them.
Exercise
After installing the IDE on Linux, the board's port shows up but every upload fails with "permission denied". What is the likely cause, and what do you do?
Show answer
Your user account isn't in the group that owns the serial device file, usually dialout (or uucp on Arch). Run sudo usermod -a -G dialout $USER, then log out and back in so the new group applies, and confirm with groups.
Exercise
You have no board connected. How can you check that the IDE and the compiler work?
Show answer
Choose a board such as Arduino Uno under Tools > Board, open File > Examples > 01.Basics > Blink, and click Verify. A successful build prints the program storage and dynamic memory usage with no errors.
Exercise
Which folder should you back up, and which can you delete to recover from a corrupted install?
Show answer
Back up the sketchbook folder (by default Documents/Arduino), because it holds your own work. The per-user data folder with board packages and tools (such as ~/.arduino15) can be deleted, because the IDE downloads those items again.