Linux

Linux install guide

This page has information on how to install and use TinyGo on Ubuntu, as well as other Linux distributions.

If you want to use TinyGo to compile your own or sample code, you can install the release version directly on your machine by following the “Quick Install” instructions below.

If you wish to build TinyGo from source, for example if you intend to contribute to the project, please take a look here.

Quick Install

Ubuntu/Debian

Fedora Linux

Arch Linux

Ubuntu/Debian

You must have Go already installed on your machine in order to install TinyGo. We recommend Go v1.16 or above.

If you are using Ubuntu or another Debian based Linux on an Intel processor, download the DEB file from Github and install it using the following commands:

wget https://github.com/tinygo-org/tinygo/releases/download/v0.19.0/tinygo_0.19.0_amd64.deb
sudo dpkg -i tinygo_0.19.0_amd64.deb

If you are on a Raspberry Pi or other ARM-based Linux computer, you should use this command instead:

wget https://github.com/tinygo-org/tinygo/releases/download/v0.19.0/tinygo_0.19.0_arm.deb
sudo dpkg -i tinygo_0.19.0_arm.deb

You will need to ensure that the path to the tinygo executable file is in your PATH variable.

export PATH=$PATH:/usr/local/tinygo/bin

You can test that the installation is working properly by running this code which should display the version number:

$ tinygo version
tinygo version 0.19.0 linux/amd64 (using go version go1.16 and LLVM version 11.0.0)

If you are only interested in compiling TinyGo code for WebAssembly then you are now done with the installation.

Otherwise, please continue with the installation of the additional requirements for your desired microcontroller.

Additional Requirements for Microcontrollers on Ubuntu/Debian

Some boards require a special flashing tool for that particular chip, like openocd or nrfjprog. See the documentation page for your board as listed here to see which flashing tool is required for your target board.

If you are only interested in compiling TinyGo code for ARM microcontrollers then you are now done with the installation.

AVR (e.g. Arduino Uno)

To compile and flash TinyGo programs for AVR based processors such as the original Arduino Uno you must install some extra tools:

sudo apt-get install gcc-avr
sudo apt-get install avr-libc
sudo apt-get install avrdude

This should allow you to compile and flash TinyGo programs on an Arduino or other supported AVR-based board.

You are now done with the TinyGo “Quick Install” for Ubuntu/Debian

Fedora Linux

There is an Fedora 30 package available for the latest TinyGo release. To install it:

sudo dnf install tinygo

If you are only interested in compiling TinyGo code for WebAssembly then you are now done with the installation.

Otherwise, please continue with the installation of the additional requirements for your desired microcontroller

Additional Requirements for Microcontrollers on Fedora Linux

There are some additional requirements to compile TinyGo programs that can run on microcontrollers.

AVR (e.g. Arduino Uno)

To compile and flash TinyGo programs for AVR based processors such as the original Arduino Uno you must install some extra tools:

sudo dnf install avr-gcc
sudo dnf install avr-libc
sudo dnf install avrdude

This should allow you to compile and flash TinyGo programs on an Arduino or other supported AVR-based board.

You are now done with the TinyGo “Quick Install” for Fedora Linux

Arch Linux

There is an AUR package available for the latest TinyGo release.

If you are only interested in compiling TinyGo code for WebAssembly then you are now done with the installation.

Otherwise, please continue with the installation of the additional requirements for your desired microcontroller

Additional Requirements for Microcontrollers on Arch Linux

There are some additional requirements to compile TinyGo programs that can run on microcontrollers.

AVR (e.g. Arduino Uno)

To compile and flash TinyGo programs for AVR based processors such as the original Arduino Uno you must install some extra tools:

avr-gcc package

avr-libc package

avrdude package

This should allow you to compile and flash TinyGo programs on an Arduino or other supported AVR-based board.

You are now done with the TinyGo “Quick Install” for Arch Linux