I am trying to give a hostname along the lines of PiComputer_User1
however I am encountering the following error:
unable to resolve host (hostname) : Name or service not known
I have added static ip routes and the appropriate hostname to /etc/hostname
and /etc/hosts
I am able to ping and connect via ssh using the ip address and routes which I added, however I still get the error whenever I try to install anything
Additionally when I try to use hostname -i
I get the error Name or service not known
In particular I am noticing that if I use hostname
it returns the hostname as PiComputerUser1
where there should be an underscore between computer and user
To confirm one more time I am using the correct naming convention in hosts
and hostname
Does anyone know why I am getting errors, and if I am allowed to use underscores in hostnames to begin with? Thank you!
-
) instead of the underscore.