Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (11.4k points)

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

1 Answer

0 votes
by (32.3k points)

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

Browse Categories

...