terça-feira, 17 de janeiro de 2012

How To Change Your Computer Name In Ubuntu 10.10 [Linux]

First, press Alt-F2 to bring up the Run dialog.

Type the following:

gksu gedit /etc/hostname
  •  and hit Run









 
  • Now bring up the Run dialog again by pressing Alt-F2. This time, type:

gksu gedit /etc/hosts



  • If you get a prompt to type your administrator password, do so to proceed, but it’s possible you might not even get that prompt before the hosts file loads up in gedit. Now locate the last line of the first block of text and replace the text with the name you chose earlier. Hit Save when you’re done correcting.




  • Close the file and restart the system. Once you’re back on your desktop, open a terminal window and verify that you have your new computer name at the header.




You should be all set if you use Ubuntu’s default web browser, Firefox. If however you use Google Chrome or Chromium, you may receive an error message that prevents the browser from opening after the system restart. I renamed the computer at least twice for this article and only got the error message after the first system renaming test.




If you did get the error message, read on.
  • To get Google Chrome or Chromium up and running again, bring up the handy Run dialog again and type what’s next:
/home/YOUR_USERNAME/.config/google-chrome
  • OR
/home/YOUR_USERNAME/.config/chromium/


Find and delete the SingletonLock file.

 Additional commenters from all over the web recommend doing “sudo hostname [NEW COMPUTER NAME]” on the terminal, which seems to only tease with a temporary change as the new name is nowhere to be seen after a reboot. I’ve also seen suggestions to restart the hostname service, but that hasn’t worked for me.
Do you know of other ways, perhaps more convenient ones or ones that don’t require a system restart, to change your computer’s name in Ubuntu? Share your nuggets of wisdom in the comments!

Image credit: 
Rafa espada
Jessica Cam Wong


Nenhum comentário:

Postar um comentário