On Debian, /etc/hosts
comes from debian-installer
and not owned by any package in particular. I have not confirmed Ubuntu, their development process a little complicated, and I don't wish spend more than a few minutes tracking down the sources.
$ dpkg --search /etc/fstab
dpkg-query: no path found matching pattern /etc/fstab
For a sysadmin, copy your desired configuration file, regardless of what the distro installer did. localhost is one of the few things it makes sense to have local files overriding what DNS says. But put records for localhost in DNS anyway.
127.0.0.1 localhost
::1 localhost