0

This question already has an answer here:

Getting 'unable to resolve host' error and need to change name. How do I do this?

Hostname is brian-HP-G60-Notebook-PC

$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   linux

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Think my hostname is way to difficult to remember :-)

No need for security on this machine.

Beginner in Linux so explicit help would be appreciated.

marked as duplicate by muru, Fabby, Eric Carvalho, αғsнιη, Elder Geek Feb 19 '15 at 20:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0
sudo nano /etc/hostname

Set the name to what you'd like to use

My hostname file.

enter image description here

sudo nano /etc/hosts

My hosts file. (ignore the sub domains, they are not needed for you, this is my development machine)

enter image description here

127.0.1.1

There is likely other stuff in the hosts file, like 127.0.0.1 localhost Just leave the rest alone.

sudo hostname

should not error out.

Not the answer you're looking for? Browse other questions tagged or ask your own question.