Ubuntu Linux Install GNU GCC Compiler and Development Environment
How do I install GNU/GCC (C and C++) compiler and related tools (such as make, debugger, man pages) collection under Ubuntu Linux operating system using command line options?
You need to install following packages on Debian and Ubuntu Linux: build-essential package – Installs the following collection to compile c/c++ program on a Ubuntu Linux including:
libc6-dev – C standard library.
gcc – C compiler.
g++ – C++ compiler.
make – GNU make utility to maintain groups of programs.
dpkg-dev – Debian package development tools.
Basically, build-essential package contains an informational list of packages which are considered essential for building Ubuntu packages including gcc compiler, make and other required tools. This package also depends on the packages on that list, to make it easy to have the build-essential packages installed. In this tutorial, you will learn about installing the GNU C compiler and GNU C++ compiler on a Ubuntu Linux.
Installing compilers using apt command
Open the terminal app and type the following apt command/apt-get command: $ sudo apt update $ sudo apt upgrade $ sudo apt install build-essential OR $ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get install build-essential Sample outputs:
Type the following commands: $ whereis gcc make $ gcc --version $ make -v
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.