This is a discussion on host name within the Linux Networking forums, part of the Linux Forums category; Where on a Linux box does the host name get specified ? /etc/hosts or /etc/sysconfig/network If both then ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
McHenry <mchenry@mchenry.com> wrote:
> Where on a Linux box does the host name get specified ? It depends. Different distributions put it different places, so you'd have to look at your distribution's documentation. > /etc/hosts > or > /etc/sysconfig/network > If both then why the double up and if not both what is the difference ? /etc/hosts is for name resolution, not telling the box what its hostname is. -- Oh to have a lodge in some vast wilderness. Where rumors of oppression and deceit, of unsuccessful and successful wars may never reach me anymore. -- William Cowper |
|
|||
|
On Fri, 16 Jun 2006 20:23:40 +0800, McHenry wrote:
> Where on a Linux box does the host name get specified ? Depends on the distribution. > /etc/hosts > or > /etc/sysconfig/network > > If both then why the double up and if not both what is the difference ? One is used during boot/network setup, the other for name to ip resolution. |
|
|||
|
On Fri, 16 Jun 2006 20:23:40 +0800, McHenry wrote:
> Where on a Linux box does the host name get specified ? > > /etc/hosts > > or > > /etc/sysconfig/network > > If both then why the double up and if not both what is the difference ? > > I am using Centos. > > Thanks in advance... /etc/sysconfig/network is the one you want. HOSTNAME=myhostname.myowndomain.com DOMAINNAME=myowndomain.com Benway |
|
|||
|
McHenry wrote: > Where on a Linux box does the host name get specified ? $ cat /etc/hostname $ man hostname > /etc/hosts > > or > > /etc/sysconfig/network > > If both then why the double up and if not both what is the difference ? The first one's a standard file, used by every Unix under the sun to store the names of other computers on the network. I don't know what the second one is. It's probably some kind of semi-proprietary config file created by a little known distro that nobody uses. |
|
|||
|
On 16 Jun 2006 19:12:06 -0700, hjwrongfellow@yahoo.co.uk wrote:
> > I don't know what the second one is. It's probably some kind > of semi-proprietary config file created by a little known distro > that nobody uses. like Redhat, Mandrake, Mandriva,... |