Ubuntu change computer name
If you would like to change your computer name in Ubuntu Linux you would need to modify two files:
First you would need to change hostname file:
sudo vi /etc/hostname
This file contains your existing computer name. You can change it to anything you like.
The next step is to modify the hosts file:
sudo vi /etc/hosts
Inside this file look for the entry starting with:
127.0.1.1
You would need to change the name in this line to whatever you change to in the first file name.
If you don’t do the second step your computer name would still be changed but you would get the error message “unable to resolve host” everything you login to your account.
4 Comments
As a Newbie, I am always searching online for articles that can help me. Thanks!
Thank you for all the information, great resource for a newbie.
Thanks for letting me post, your blog is great, will definitely be back!!!!
Excellent information, top notch job, thanks for all the work.