I just installed Ubuntu Core on my Raspberry Pi 3 and I would like to use a name other than localhost.localdomain.

How would I do this? Are there special considerations to take into account?


Since Ubuntu 13.10 you should use hostnamectl:

sudo hostnamectl set-hostname 'new-hostname'

The advantages are numerous including one command to make all those changes reducing problems with typos or sudo (you can easily break sudo if you make mistakes) and no reboot is required.

See also How do I change the computer name?

  • 13.04, actually (not that it matters, I suppose) And editing /etc/hosts still has to be done manually. – muru Jan 31 '17 at 2:14

Your Answer

