How do I change my hostname in Elementary OS?

I've tried vi /etc/host didn't do anything.

1 Answer 1


For temporary change, you can use hostname command:

hostname <new name>

For permanent change, you must edit /etc/hostname file, replace old name with new name.

You must log in to answer this question.

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