Back
I have two VMs, one is the master and the other is the worker. I'm trying to create a kubernetes cluster. When I try to edit the hosts name, I get the following error:
"hosts" E212: Can"t open file for writing
Firstly, execute this command:
sudo su
When you will be asked for password, just simply give the password.
After that you can edit the hosts file using any one of the below commands:
nano /etc/hosts
or
vi /etc/hosts
31k questions
32.8k answers
501 comments
693 users