Make hosts file editable with out sudo

hosts file allow you to override DNS. This will allow you to point a domain to difernt IP address on your computer. It is helpful for testing sites during site migrations.

If you edit hosts file a lot, it is better to make it owned by you or make it editable by everyone.

Now onwards, you can edit the file with out sudo requirment.

Another option is make it owned by current user.

See /etc/hosts

Leave a Reply

Your email address will not be published. Required fields are marked *