Changing host name
Christofer C. Bell
christofer.c.bell at gmail.com
Sat Jun 1 22:26:56 UTC 2013
On Sat, Jun 1, 2013 at 5:02 PM, Bob <ubuntu-qygzanxc at listemail.net> wrote:
> ** 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.
>
If you have an MTA installed (exim, postfix, sendmail, etc) you may also
need to change /etc/mailname and any other appropriate MTA configuration
files (e.g.; /etc/postfix/mail.cf). That said, you can accomplish this
with the appropriate dpkg-reconfigure command. For example:
$ sudo dpkg-reconfigure postfix
--
Chris
"If you wish to make an apple pie from scratch, you must first invent the
Universe." -- Carl Sagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130601/8d3394e5/attachment.html>
More information about the ubuntu-users
mailing list