Arduino IDE is an open-source tool that is used for writing, compiling and uploading code to Arduino compatible boards. It consists of an editor and a compiler that enables better and assisted editing and compiling. It can run on all major OS: Linux, Windows, and MacOS. In one of our previous posts, we demonstrated the installation of Arduino IDE on Debian OS.
In this post, we will cover how to install Arduino IDE on CentOS using following two ways:
- Installation via direct download
- Installation via snap
You will require:
- CentOS machine
- Sudo user
Note: We will be demonstrating the installation procedure on CentOS 8 system.
Installation via Direct Download
In the following method, we will install Arduino IDE by downloading its package from the Arduino official website. Follow the below simple steps for the installation procedure:
1. To download Arduino IDE, visit this link and download the package for Linux OS.
After the file is downloaded, you will find the downloaded file in tar.xz format in your Downloads folder.
Alternatively, you can use the following command to download Arduino IDE using the wget command:
The downloaded file will be saved to your current directory in tar.xz format.
2. Next, you will need to extract the archive. Navigate to the directory where the downloaded tar.xz file is saved. On the other hand, if it is in the current directory, then directly run the below command to extract the downloaded archive:
$ tar -xf arduino-1.8.15-linux64.tar.xz
The version of the downloaded file may differ in your case. Make sure you specify the correct version.
3. The extracted directory contains the install script for the Arduino IDE. To install Arduino IDE, you will need to run that script. To do so, first navigate to the extracted archive using the command below:
$ cd arduino-1.8.15/
Then run the install.sh script as follows:
$ sudo ./install.sh
Now the Arduino IDE will be installed on your system and you will see the below similar output.
Launch Arduino IDE
To launch Arduino IDE, you can either use the command-line shell or the GUI. To launch Arduino IDE from the shell, use the below command:
Alternatively, to launch Arduino IDE from the GUI, press the super key on your keyboard to open the search bar and type arduino in it. When the icon for Arduino IDE appears in the search result, click it to launch Arduino IDE.
This is the default interface of Arduino IDE you should see after launching.
Installation via Snap
Arduino IDE is also available for installation via snap. Follow the below simple steps for the installation procedure:
1. First, add the EPEL repository by running the below command:
$ sudo yum install epel-release
2. Then install snapd by running the below command:
$ sudo yum install snapd
3. After you have installed snapd, you will need to enable the snapd.socket:
$ sudo systemctl enable --now snapd.socket
4. Then create a symlink to allow the installation of classic snaps:
$ sudo ln -s /var/lib/snapd/snap /snap
5. Now to install Arduino IDE, run the below command in the Terminal:
$ sudo snap install arduino
Once Arduino IDE is installed, you will see the following similar output:
6. Now, the last step you have to do is to add your user account to the dialout group to set serial port permission:
$ sudo usermod -a -G dialout <username>
Replace the <username> with your user account name which in our case is “kbuzdar”:
$ sudo usermod -a -G dialout kbuzdar
After this step, you may need to logout and log back in.
Launch Arduino IDE
To launch Arduino IDE, run the below command in Terminal:
$ snap run arduino
This is the default view of Arduino IDE you should see after launching.
Uninstall Arduino IDE
If you no longer require Arduino IDE on your machine, you can uninstall it easily using the below methods.
1. If you have installed Arduino IDE by downloading it from the official website, use the below commands to uninstall it.
Navigate to the Arduino IDE extracted archive:
$ cd Arduino-1.8.15/
Then run the uninstall script as follows:
$ sudo ./uninstall.sh/
Then remove the Arduino directory:
$ sudo rm -r Arduino
2. If you have installed Arduino IDE using the snap, use the below command to uninstall it.
$ sudo snap remove arduino
Using either the direct download method or the snap method, you can easily install Arduino IDE on CentOS machine. Both the methods are easy and just involve a few commands. The method to uninstall Arduino is also described in the post in case you need to do so.