Running Arduino on Ubuntu

[Arduino]( is an open-source electronics prototyping platform based on flexible, easy-to-use microcontroller hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

This short tutorial will guide you through the installation of the [Arduino development environment]( on Ubuntu. These instructions reference `arduino-0010` and have been tested on Feisty and Gutsy, both 32-bit *and* 64-bit installations. Thanks to [this post]( on the Ubuntu Forums for the basic setup.

Update 5/3/2008: Successfully tested on Kubuntu Hardy 64 with arduino-0011

**(1) Install** the necessary architecture-specific dependencies (the Java runtime and the AVR microcontroller tools):

sudo apt-get install sun-java5-bin sun-java5-jdk avr-libc gcc-avr librxtx-java

**(2) Remove** one [conflicting package](

sudo apt-get remove brltty

**(3) Configure** Java to work with Arduino:

sudo update-alternatives --config java

You should see a dialog similar to this:

There are 5 alternatives which provide `java'.

  Selection    Alternative
          1    /usr/bin/gij-4.2
          2    /usr/lib/jvm/java-6-sun/jre/bin/java
 +        3    /usr/lib/j2se/1.4/bin/java
          4    /usr/lib/jvm/ia32-java-6-sun/jre/bin/java
*         5    /usr/lib/jvm/java-1.5.0-sun/jre/bin/java

Press enter to keep the default[*], or type selection number:

Locate the option containing “java-1.5.0-sun” and select it. This will make Sun’s Java v.1.5 the default on your system (the GNU version doesn’t support the Arduino environment).

**(4) Download** the latest release of the [Arduino IDE software]( for Linux, and extract the compressed folder.

**(5) Open** the subdirectory `arduino-0010/lib/` and rename the following files as shown (resolves conflicts with librxtx-java):


**(6) Edit** the `arduino` launcher file (`arduino-0010/arduino`) with a text editor and replace the contents with the following (resolves conflicts with librxtx-java):


# Original: CLASSPATH=java/lib/rt.jar:lib:lib/build:lib/pde.jar:lib/core.jar:lib/antlr.jar:lib/oro.jar:lib/registry.jar:lib/mrj.jar:lib/RXTXcomm.jar

# put the directory where this file lives in the front of the path, because
# that directory also contains jikes, which we will need at runtime.
export PATH

# put the directory with the native RXTX libs in the library path
# Original: LD_LIBRARY_PATH=`pwd`/lib:${LD_LIBRARY_PATH}


**(7) Launch** the Arduino IDE by navigating to the `arduino-0010` directory in a terminal and typing:


**(8) Learn!** For more information about Arduino and learning electronics, see [Ladyada’s (fabulous) Arduino Tutorial](!


4 responses to “Running Arduino on Ubuntu

  1. who ever put this up, thank you very much u saved me hours of trying to figure this out myself, thanks again

  2. I can’t seem to get it running in my terminal…

    It just tells me that it is a directory.

    How do I open the Arduino workspace? or is it all done from the terminal on ubuntu


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s