A very simple tool to manage your hosts file
It's nothing to worry. Just execute the below command.
sudo install hostsctl /usr/local/bin
OR
chmod +x hostsctl
sudo cp hostsctl /usr/local/bin
Adding a host
hostsctl -a <ip> <hostname>
hostsctl -rh <hostname>
hostsctl -ri <ip>
You know sometimes we regert the things we do 🤭
hostsctl --restore