Installing Arduino 1.6.12 from terminal + boards manager CLI

Hello

Is there some reference on how to install the latest Arduino using only Terminal? I've found https://playground.arduino.cc/Linux/Ubuntu but it states that in this way only 1.0.5 is available.

I'm building a Vagrant image with a development environment for some specific cases and I'd like everything to be set up during image creation without the end having to install anything after the initial image setup. With this idea in mind I'm also looking for a way to install some additional boards via Boards Manager without user having to touch the IDE. Is this possible and could someone be so kind to point me to some resources to get started?

https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc

I use code like this to do continuous integration such as TravisCI. Does a full installation of IDE, libraries, board support then compile sketch for Due. I do not know if it works with 1.6.x.

IDEVER="1.8.4"
wget -O arduino.tar.xz https://downloads.arduino.cc/arduino-${IDEVER}-linux64.tar.xz
tar xf arduino.tar.xz
mv arduino-${IDEVER} ${HOME}/arduino_ide
IDEDIR="${HOME}/arduino_ide"
LIBDIR="${IDEDIR}/portable/sketchbook/libraries"
mkdir -p "${LIBDIR}"
export PATH="${IDEDIR}:${PATH}"
cd ${IDEDIR}
which arduino
arduino --install-library "Ethernet"
arduino --install-boards "arduino:sam"
# cd some_directory_with_code
BOARD="arduino:sam:arduino_due_x"
arduino --verbose-build --verify --board ${BOARD} mysketch/mysketch.ino

Just curious, why 1.6.12?

gdsports: I do not know if it works with 1.6.x.

With previous versions of the IDE (I believe something like 1.8.1 and earlier), you need to create a virtual frame buffer (xvfb) to use the IDE CLI headless. This is explained here: https://learn.adafruit.com/continuous-integration-arduino-and-you/testing-your-project and used to be in the manpage before the IDE version that removed that requirement: https://github.com/arduino/Arduino/commit/e202d2e4cdfad9e633ef707f9fda3c3f70659cc7 I'm not sure that is even a concern for the OP and other than that, it should work fine with 1.6.12.

Thank you @gdsports. It's exactly what I've needed!