How to Install GCC the C compiler on Ubuntu 22.04 LTS / Ubuntu 24.04 LTS Linux

preview_player
Показать описание
Learn how to install GCC, the C compiler, on Ubuntu 22.04 LTS (Linux) using the build-essential package. #Ubuntu #GCC #CCompiler #Linux

GCC (GNU Compiler Collection) is a popular compiler for the C programming language. To install GCC on your Ubuntu 22.04 LTS system, you can utilize the build-essential package, which includes GCC along with other necessary tools for building software.

Follow these steps to install GCC on Ubuntu 22.04 LTS:

1. Open the Terminal: Launch the Terminal on your Ubuntu system. You can do this by searching for "Terminal" in the applications or using the Ctrl+Alt+T keyboard shortcut.

2. Update package information: Before installing any packages, it's a good practice to update the package information. Run the following command in the Terminal:

```
sudo apt update
```

3. Install build-essential: Use the following command to install the build-essential package, which includes GCC:

```
sudo apt install build-essential
```

This command will install GCC and other necessary tools required for building software.

4. Verify the installation: After the installation is complete, you can verify it by checking the version of GCC installed on your system. Open the Terminal and run the following command:

```
gcc --version
```

This command will display the version of GCC installed on your system.

Congratulations! You have successfully installed GCC, the C compiler, on Ubuntu 22.04 LTS. Now you can write and compile C programs using GCC.

Installing GCC on your Ubuntu system enables you to develop and run C programs, allowing you to dive into the world of C programming and build a wide range of software applications.

Start your C programming journey on Ubuntu 22.04 LTS by installing GCC. #Ubuntu #GCC #CCompiler #Linux #CProgramming
Рекомендации по теме
Комментарии
Автор

When i type my password after executing the command in the terminal. I get "the username" is not in the sudoers file. This incident will be reported. Which 8s on my Ubuntu VM's Terminal.

Please help what to do... to sort out this issue...

CSE-C_OFFICIAL_.
Автор

Thanks for this helpful guide on installing GCC, the C compiler, on Ubuntu 22.04 LTS! 🚀 Your step-by-step instructions make it easy for both beginners and experienced users to set up GCC and start coding in C. The use of the build-essential package is a smart choice, ensuring that we get all the necessary tools in one go. Your clear explanations and verification steps make the process smooth. Ready to dive into the world of C programming on Ubuntu! 💻👩‍💻 #Ubuntu #GCC #CCompiler #Linux #ProgrammingKnowledge2

dnasredine
Автор

Good explanation... It was very useful for me.

joelcioborges
Автор

When texting sudo apt install build-essential .
It's not working 😭

yannicktiakoupinglong
Автор

Pls what's going wrong, can I have help

yannicktiakoupinglong
Автор

hey, so if i change anything in file i need to recomplile everything again..or i can just cintinuee with only ./test.c command

aryansnagar
Автор

i am unable to enter my password after writing the command, i am using oracle virtual box, can somebody help please

salaar_saaiem