22

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?

1 Answer 1

28

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?

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .