GNU Compiler
About this Install Guide
| Reading time: | 15 min |
| Last updated: | 22 Jun 2026 |
| Ecosystem dashboard: | View |
| Reading time: |
| 15 min |
| Last updated: |
| 22 Jun 2026 |
| Ecosystem dashboard: |
| View |
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:
uname -m
The output should be:
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.
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 group install "development-tools" -y
If sudo is not available become root and omit the sudo.
dnf update -y
sudo 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:
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!
Give Feedback
How would you rate this tool quick-install guide?
What is the primary reason for your feedback ?
Thank you! We're grateful for your feedback.
- Have more feedback? Log an issue on GitHub.
- Want to collaborate? Join our Discord server.