0

I have updated my system's hostname in /etc/hostname file as master. I have also mapped my /etc/hosts file like

<ip> master

Still, when I type $ hostname, I get a different hostname.

I basically want to change my hostname from the default one to "master".

What file am I missing out?

Tim
  • 33,500
Prasanna
  • 157

1 Answers1

1

The problem is that you should have:

127.0.0.1   localhost
127.0.1.1   master

in your /etch/hosts file, not a real ip address.

Simply run the command sudo hostname your-new-name

If that doesn't work, can you not use localhost instead of master?

Tim
  • 33,500