change permission /etc/hosts?
Is it safe to set the permissions of /etc/hosts to 664, where the owner and group has read and write access and everyone else can read?

It depends on how well you maintain the system. Basically it shouldn't be a problem, especially as you are free to change the file group-membership to a single-user-group for your account only (if there were processes reading the file using default 4 permission for group, they would access now using the same permission for others).
Nevertheless, if you use Vagrant Hostmanager plugin, there are clear instructions how to remove the necessity to provide password at run-time, by adding some configuration to sudoers file:

Add the following snippet to the sudoers file (e.g. /etc/sudoers.d/vagrant_hostmanager):
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp &lt;home-directory&gt;/.vagrant.d/tmp/hosts.local /etc/hosts
%&lt;admin-group&gt; ALL=(root) NOPASSWD: VAGRANT_HOSTMANAGER_UPDATE

Replace &lt;home-directory&gt; with your actual home directory (e.g. /home/joe) and &lt;admin-group&gt; with the group that is used by the system for sudo access (usually sudo on Debian/Ubuntu systems and wheel on Fedora/Red Hat systems).
If necessary, add yourself to the &lt;admin-group&gt;:
usermod -aG &lt;admin-group&gt; &lt;user-name&gt;

Replace &lt;admin-group&gt; with the group that is used by the system for sudo access (see above) and &lt;user-name&gt; with you user name.