The hostname of the Ubuntu install on my netbook reads more like a barcode than a ‘computer name’.

This is largely my own fault; the Ubuntu installer lets you set a custom ‘computer name’ during set-up.

ubuntu installer

For the most part we have very little reason to remember our computer names; indeed, my reason for changing mine is purely for aesthetic reasons.

Thankfully changing computer name in Ubuntu 11.10 is simple enough: –

  • Press ALT+F2
  • Type: ‘gksu gedit /etc/hostname /etc/hosts
  • Hit Return/Enter
  • Enter your password when prompted
  • A text editor window will appear with two tabs open
  • Edit the name (highlighted in images below) in BOTH tabs to something you want, making sure they match.
  • Hit save, exit and reboot.

Changing Ubuntu Hostname

How To computername system