# [Native compiler](https://learn.arm.com/install-guides/gcc/native/)

## About this Install Guide

| Reading time:            | 15 min             |
|--------------------------|---------------------|
| Last updated:            | 22 Jun 2026        |
| Ecosystem dashboard:     | [View](https://developer.arm.com/ecosystem-dashboard/linux?package=GNU%20Toolchain%20%28GCC%29) |

This guide shows you how to install and use the tool with the most common configuration. For advanced options and complete reference information, see the official documentation. Some install guides also include optional next steps to help you explore related workflows or integrations.

GCC is available on all Linux distributions and can be installed using the package manager.

## What do I need before installing GCC?

Follow the instructions below to install GCC on an Arm Linux distribution. This covers `gcc` and `g++` for compiling C and C++ applications.

Confirm you are using an Arm machine by running:

```bash
uname -m
```

The output should be:

```bash
__output__ aarch64
```

If you see a different result, you are not using an Arm computer running 64-bit Linux.

## How do I download a native GCC compiler on Linux?

The Linux package manager downloads the required files so there are no special instructions.

## How do I install a native GCC compiler on Linux?

### Installing on Debian based distributions such as Ubuntu

Use the `apt` command to install software packages on any Debian based Linux distribution, including Ubuntu.

```bash
sudo apt update
sudo apt install gcc g++ -y
```

Another meta-package on Ubuntu is `build-essential`. This will install the most common tools and libraries with a single command.

```bash
sudo apt install build-essential -y
```

### Installing on Red Hat / Fedora / Amazon Linux

These Linux distributions use `dnf` as the package manager.

To install the most common development tools use the commands below. If the machine has `sudo` you can use it.

```bash
sudo dnf update -y
sudo dnf group install "development-tools" -y
```

If `sudo` is not available become *root* and omit the `sudo`.

```bash
dnf update -y
dnf group install "development-tools" -y
```

## Does GCC require a license?

GCC is open source and freely available for use.

## How do I get started with GCC?

To confirm the installation is complete run:

```bash
gcc --version
```

To compile an example program, create a text file named hello-world.c with the contents below.

```c
#include <stdio.h>

int main()
{
    printf("Hello, Arm World!\n");
    return 0;
}
```

To compile and run the application use:

```bash
gcc -o hello-world hello-world.c
./hello-world
```

Observe the output:

```bash
__output__ Hello, Arm World!
```
