Changing host name
Bob
ubuntu-qygzanxc at listemail.net
Sat Jun 1 22:02:41 UTC 2013
** Reply to message from Colin Law <clanlaw at googlemail.com> on Sat, 1 Jun 2013
22:18:49 +0100
> >> What command do I use to change the "host name" for my computer?
> >>
> >> --
> >> Robert Blair
> >>
> > Welcome!
> >
> > You just need to edit /etc/hostname file whatever your text editor is.
> > Just make sure you have enough privilege to edit it.
> > Mines is below:
> > toshi at ubuntu13-04:/etc$ ll hostname
> > -rw-r--r-- 1 root root 12 May 21 20:09 hostname
> > toshi at ubuntu13-04:/etc$ cat hostname
> > ubuntu13-04
>
> I think you have to change /etc/hosts also, so if you open a terminal and type
> gksu gedit /etc/hostname
> edit it, save and exit. Then
> gksu gedit /etc/hosts
> and edit a line which should be something like
> 127.0.1.1 your_current_host_name
> replacing the current name with the desired new one (leave the rest of
> the file as it is), then save exit and reboot and I believe that
> should do it. It might be best to hang on a bit however in case
> someone else comes up with more things you need to do.
Thank you Toshi and Colin.
I have change /etc/hostname and /etc/hosts, it looks like that works.
--
Robert Blair
More information about the ubuntu-users
mailing list