Profile (Portage)
A Portage profile specifies default values for global and per-package USE flags, specifies default values for most variables found in /etc/portage/make.conf, and defines a set of system packages. It masks unstable package versions and USE flags.
Documentation about Portage profile for Gentoo system: https://devmanual.gentoo.org/profiles/
Ebuild An ebuild is a bash script which is executed within a special environment. Files should be simple text files with a .ebuild extension.
Documentation about Ebuilds for Gentoo systems: https://devmanual.gentoo.org/ebuild-writing/index.html