No write permission while editing in VI editor for /etc/hosts

In lab environment there is no write permission to edit the /etc/hosts. I tried to change its permission but nothing happen

Later I tried with sudo then it runs properly :>> sudo vi etc/hosts