Package Install GCC in Ubuntu 22.04




Package Install GCC in Ubuntu 22.04

Hi Guys

In this tutorial we will go over the demonstration of Package Install GCC in Ubuntu 22.04. I would like to share with you Softwere Installation GCC in Ubuntu 22.04. you'll learn Install the Build GCC in Ubuntu 22.04. I’m going to show you about Check GCC Version in Ubuntu 22.04. Alright, let’s dive into the steps.

You can use this post for ubuntu 14.04, ubuntu 16.04, ubuntu 18.4, ubuntu 20.04, ubuntu 21 and ubuntu 22.04 versions.

(1). Update System Dependencies

(2). Install GCC

(3). Verify GCC Installation

(4). Create a C program in Run In GCC

Step 1: Update System Dependencies

Run the following command on a command line or terminal to update system dependencies:

sudo apt update

Step 2: Install GCC

Then install gcc in ubuntu system using the following command:

sudo apt install build-essential

Step 3: Verify GCC Installation

Use the following command on command line to verify gcc installation on ubuntu system:

gcc --version

Step 4: Create a C program in Run In GCC

Once the gcc installation has been done, Then create a simple hello world C program in nano editor and saved the file as helloworld.c.


int main() {

// printf() displays the string inside quotation

printf("Hello, World!");

return 0;


Save this file and convert this into an executable one.

gcc -o helloworld helloworld.c

The above command will generate a binary file named "helloworld" in the same directory. :


The C program was executed successfully.