About this Install Guide

This guide is intended to get you up and running with this tool quickly with the most common settings. For a thorough review of all options, refer to the official documentation.

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

Before you begin

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:

    

        
        
            uname -m
        
    

The output should be:

    

        
        aarch64

        
    

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

Download

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

Installation

Installing on Debian based distributions such as Ubuntu

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

    

        
        
            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.

    

        
        
            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.

    

        
        
            sudo dnf update -y
sudo dnf groupinstall 'Development Tools' -y
        
    

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

    

        
        
            dnf update -y
dnf groupinstall 'Development Tools' -y
        
    

Setting up product license

GCC is open source and freely available for use.

Get started

To confirm the installation is complete run:

    

        
        
            gcc --version
        
    

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

    

        
        
            #include <stdio.h>

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

To compile and run the application use:

    

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

Observe the output:

    

        
        Hello, Arm World!

        
    

Feedback

How would you rate the overall quality of this tool quick-install guide?