Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I change the computer name on an Ubuntu desktop computer?

I already tried changing the /etc/hostname file but that only caused the wireless to stop working. I found an old guide that suggested changing the setting under networking, but that screen doesn't exist in 9.10 (Karmic Koala).

share|improve this question

3 Answers 3

up vote 2 down vote accepted

There is a tutorial on Ubuntu Forums: link

share|improve this answer
Worked, thanks. –  C. Ross Dec 17 '09 at 20:02

Change both /etc/hostname and /etc/hosts:

gksudo gedit /etc/hostname
gksudo gedit /etc/hosts
share|improve this answer
And type hostname "new name" so it's taken into consideration without rebooting. –  ℝaphink Dec 17 '09 at 19:59

How about sudo hostname "new computer name"

share|improve this answer
It doesn't last after reboot. –  ℝaphink Dec 17 '09 at 19:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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