The GNU toolchain is the stage on which we can develop softwares in Linux. Understanding the importance of GNU toolchain, every major distribution bundles it with a package. In Debian and its derivatives such as Ubuntu, Kali Linux, Linux Mint etc. that package is called build-essential.
build-essential package installs the following tools that will enable us to compile c/c++ program on Debian/Ubuntu systems:
- 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 Debian 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.
Installation is pretty straight forward using the apt-get command-line utility.
Step #1 : Update the local repo index files
sudo apt-get update
Step #2 : Download and install build-essential package
sudo apt-get install build-essential
Step #3 : Verify
whereis gcc make gcc -v make -v