๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ linux-unix โ€บ gcc-command-in-linux-with-examples
gcc command in Linux with examples - GeeksforGeeks
October 4, 2025 - -std=c11 :This command will use the c11 version of standards for compiling the source.c program, which allows to define variable under loop initializations also using newer standards version is preferred. gcc -Wall -std=c11 source.c -o opt ยท -c : This command compile the program and give the object file as output, which is used to make libraries. -v : This option is used for the verbose purpose. Comment ยท Article Tags: Article Tags: Linux-Unix ยท
๐ŸŒ
Linux Man Pages
man7.org โ€บ linux โ€บ man-pages โ€บ man1 โ€บ gcc.1.html
gcc(1) - Linux manual page
If the description for a particular option does not mention a source language, you can use that option with all supported languages. The usual way to run GCC is to run the executable called gcc, or machine-gcc when cross-compiling, or machine-gcc-version to run a specific version of GCC. When you compile C++ programs, you should invoke GCC as g++ instead.
๐ŸŒ
Incredibuild
incredibuild.com โ€บ home โ€บ integrations โ€บ gcc
What is GNU Compiler Collection (GCC) | Incredibuild
September 17, 2024 - GCC is the heart of the GNU toolchain, the development system used to compile most Linux and open-source software. While there are a few specialty distributions that omit GCC, you will find it in nearly every Linux system.The Linux kernel itself ...
๐ŸŒ
ArchWiki
wiki.archlinux.org โ€บ title โ€บ GNU_Compiler_Collection
GNU Compiler Collection - GCC
The GNU Compiler Collection (GCC) is part of the GNU toolchain and includes front ends for C and C++.
optimizing compiler produced by the GNU Project, key component of the GNU tool-chain and standard compiler for most projects related to GNU and the Linux kernel.
GCC_10.2_GNU_Compiler_Collection_self-compilation.png
gcc 11 1 0 compiling chicken screenshot
The GNU Compiler Collection (GCC) (formerly GNU C Compiler) is a collection of compilers from the GNU Project that support various programming languages, hardware architectures, and operating systems. The Free Software Foundation โ€ฆ Wikipedia
Factsheet
Original author Richard Stallman
Developer GNU Project
Initial release March 22, 1987; 38 years ago (1987-03-22)
Factsheet
Original author Richard Stallman
Developer GNU Project
Initial release March 22, 1987; 38 years ago (1987-03-22)
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ GNU_Compiler_Collection
GNU Compiler Collection - Wikipedia
3 weeks ago - As well as being the official compiler of the GNU operating system, GCC has been adopted as the standard compiler by many other modern Unix-like computer operating systems, including most Linux distributions. Most BSD family operating systems also switched to GCC shortly after its release, although since then, FreeBSD and Apple macOS have moved to the Clang compiler, largely due to licensing reasons.
Top answer
1 of 5
20

I'm still on Ubuntu 22.04 LTS but needed g++14. The sudo apt-get gcc-14 did not work for me, as it installed clang++14 for some reason (perhaps a misconfiguration on my part). What did work for me was following the instructions I found at https://www.dedicatedcore.com/blog/install-gcc-compiler-ubuntu/

The steps I took:

sudo apt install build-essential
sudo apt install libmpfr-dev libgmp3-dev libmpc-dev -y
wget https://ftp.gnu.org/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.gz
tar -xf gcc-14.1.0.tar.gz
cd gcc-14.1.0
./configure -v --build=$(uname -m)-linux-gnu --host=$(uname -m)-linux-gnu --target=$(uname -m)-linux-gnu --prefix=/usr/local/gcc-14.1.0 --enable-checking=release --enable-languages=c,c++ --disable-multilib --program-suffix=-14.1.0
make
sudo make install

And if you would like to make it the default:

sudo update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-14.1.0/bin/g++-14.1.0 14
sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-14.1.0/bin/gcc-14.1.0 14

After that, g++ showed I was running version 14.1.0. I was then able to compile my project that included some c++20/23 features that were not in the previous versions of g++ (chrono/format).

2 of 5
15

GCC-14 (and G++-14) is available in the Universe repository for Ubuntu 24.04, as evident in the Ubuntu Package archive.

It is equally evident that this package is not available for Ubuntu 22.04, so installing this on 22.04 will require some third-party interference, or you have to compile it yourself.

See here on how to enable the Universe repositories.

๐ŸŒ
Medium
medium.com โ€บ @ihouelecaurcy โ€บ how-to-check-and-install-gcc-on-linux-complete-developer-guide-98697e2ab78f
How to Check and Install GCC on Linux: Complete Developer Guide | by Ihouele Caurcy | Medium
July 24, 2025 - sudo dnf install gcc # Or install complete development tools sudo dnf groupinstall "Development Tools" ... # Check system headers ls /usr/include/stdio.h >/dev/null 2>&1 && \ echo "โœ… Headers present" || \ echo "โŒ Headers missing" # Debian/Ubuntu sudo apt install libc6-dev linux-libc-dev
๐ŸŒ
Scaler
scaler.com โ€บ home โ€บ topics โ€บ gcc command in linux
gcc Command in Linux - Scaler Topics
January 1, 2024 - The GCC command in Linux, which stands for GNU Compiler Collection, is an incredibly powerful tool used primarily for compiling and debugging programs written in C, C++, and other languages.
Find elsewhere
๐ŸŒ
RapidTables
rapidtables.com โ€บ code โ€บ linux โ€บ gcc.html
GCC C compiler
GCC is a short of GNU Compiler Collection, a C compiler for Linux. ... Compile myfile.c with and link with static library libmath.a located in /user/local/math to output file execfile:
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ linux-linux-gcc-command-with-practical-examples-422697
Linux gcc Command with Practical Examples | LabEx
In this lab, you first learned the basics of the GCC (GNU Compiler Collection) compiler, including how to check the installed version and the common command-line options such as -c, -o, -g, -Wall, -Werror, and -O<n>. You then practiced compiling ...
๐ŸŒ
GNU
gcc.gnu.org
GCC, the GNU Compiler Collection - GNU Project
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Objective-C++, Fortran, Ada, Go, D, Modula-2, COBOL, Rust, and Algol 68 as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ installation guide โ€บ how-to-install-gcc-compiler-on-linux
How to Install GCC Compiler on Linux? - GeeksforGeeks
July 23, 2025 - Command 3: After the second command it will install GCC on your Linux, to verify it is installed correctly, check the version of the GCC.
๐ŸŒ
iO Flood
ioflood.com โ€บ blog โ€บ gcc-linux-command
GCC Command Guide: How-To Compile C Code in Linux
December 12, 2023 - The GCC command, also known as the GNU Compiler Collection, is a key component of the Linux ecosystem. Itโ€™s not just a simple command but a full-fledged collection of compilers for various programming languages, with C and C++ being the most ...
๐ŸŒ
Ubuntu
documentation.ubuntu.com โ€บ ubuntu-for-developers โ€บ howto โ€บ gcc-setup
How to set up a development environment for GCC on Ubuntu - Ubuntu for Developers
December 2, 2025 - The GNU Compiler Collection (GCC) is a set of compilers for programming languages, including C, C++, Assembly, and many more. It is the ยท de facto standard in Linux environments and is used to compile both the GNU toolchain and the Linux kernel.
๐ŸŒ
EDUCBA
educba.com โ€บ home โ€บ software development โ€บ software development tutorials โ€บ linux tutorial โ€บ gcc command in linux
GCC Command in Linux | Learn GCC Options in Linux Environment
March 20, 2023 - In this article we will see an outline on GCC Command in Linux, GCC is abbreviated as GNU Complier Collection. GCC can compile C, C++, Ada and many more programming languages which are understandable by the system.
Call ย  +917738666252
Address ย  Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ sysadmin โ€บ how to install gcc compiler on ubuntu
How to Install GCC Compiler on Ubuntu {3 Simple Methods}
February 20, 2025 - The GCC (GNU Compiler Collection) is a free software compiler system capable of compiling several programming languages, including C, C++, Objective-C, and Fortran. Developers who want to build C or C++ software on a Linux-based system need ...
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ home โ€บ unix_commands โ€บ gcc command in unix
GCC Command in Unix
October 13, 2007 - This will help you in learning how to get started with the command. ... The basic use of gcc on Linux is to compile a single C source file. It is possible by simply using the gcc command along with the source file name you want to compile.
๐ŸŒ
Greenwebpage
greenwebpage.com โ€บ home โ€บ blog โ€บ how to install gcc compiler on linux
How to Install GCC Compiler on Linux - Greenwebpage Community
July 4, 2024 - GCC, the GNU Compiler Collection, is an essential component of the development system for Linux-based distributions and other operating systems. It provides front ends for programming languages such as C and C++. Installing GCC on Ubuntu 24.04 ...
๐ŸŒ
University of Alabama
oit.ua.edu โ€บ software โ€บ gcc
GCC - Office of Information Technology | The University of Alabama
The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain and the standard compiler for most projects related to GNU and Linux, including the Linux kernel.
๐ŸŒ
Linux Mint Forums
forums.linuxmint.com โ€บ board index โ€บ main edition support โ€บ beginner questions
Installing gcc and g++ - Linux Mint Forums
I get the same results with gcc. I've tried sudo apt-get install mediainfo mediainfo-gui open jdk-8-jre wget ffmpeg x264 x265 (to install java) This produces the following errors E: unable to locate package open. E:unable to locate package jdk-8-jre Please help, I am not normally interested in point & click stuff (GUI) . I normally drop to a terminal for all my Unix (now Linux...