You might run into a situation that requires you to change your computer name, either because you need it to meet a naming scheme or you’re just bored with it and want something better. By following these steps, you’ll give your computer a new identity in no time.
- Open a terminal window.
- Input the following command and hit Enter:
gksudo gedit /etc/hostname (for linux desktop with GEdit)
sudo vi /etc/hostname (for linux server with vi editor)
- When prompted, enter the administrator password and click the OK button.
- The hostname file will open, displaying the current computer name. Replace the current computer name with the desired new name.
- Click Save.
- Close all open windows and restart your system.
After your system has restarted, it will have the new computer name.
Sumber : http://www.tech-recipes.com/rx/2732/ubuntu_how_to_change_computer_name/