What are "build-essential" & "build-dep"?

The command sudo apt-get build-dep packagename means "As root, install all dependencies for 'packagename' so that I can build it". So build-dep is an apt-get command just like install, remove, update, etc.

build-essential is a package which contains references to numerous packages needed for building software in general.


The build-essential package is a reference for all the packages needed to compile a Debian package. It generally includes the GCC/g++ compilers and libraries and some other utilities.

Check out the documentation here.


build-essential has one magical property: it does not need to be listed as a build dependency under the Build-Depends control field (debian-packages) of source packages as documented at https://www.debian.org/doc/debian-policy/ch-source.html#s-pkg-relations

You can get a list of the build-essential packages at:

cat /usr/share/doc/build-essential/list

You can also determine if a package is part of build-essential with:

apt-cache show gcc

which says:

Build-Essential: yes