Click to See Complete Forum and Search --> : dhcpcd hostname on suse 9.0
kittanl
03-04-2004, 03:38 PM
Hello,
I'm an newbie on Linux and I have the next question.
I try on my linux box to activate the hostname option of dhcpcd.
In previeous read documentation I see, that I can start dhcpcd -h (hostname), but how can I make this permanent, and what file do I have to modify.
I don't use X-windows
With kind regards
Erwin
mdwatts
03-04-2004, 03:57 PM
/etc/HOSTNAME stores the hostname.
You can also add the hostname to /etc/hosts.
127.0.0.1 localhost.localdomain localhost <your hostname>
If using static ip
127.0.0.1 localhost.localdomain localhost
<your is address> <your hostname>
Does sax/sax2 (commandline) have the option to configure your hostname?
mdwatts
03-04-2004, 04:00 PM
From the SuSE knowledgebase.
http://portal.suse.com/sdb/en/1996/07/hostname_domainname.html
kittanl
03-04-2004, 05:28 PM
There is no etc/HOSTNAME file, does this mean I have to create one, in capital letters.
I modified my etc/hosts file, but I don't get an ip-adress from @home.
For test purpose I setup an DHCP-server, and I get on my linux box an ip-address. At my DHCP-server it shows the name linux (for the time being is this the name of my linux box), and not the name I added at the hosts file.
On my linux box are two nics, maybe this is reason?
Regards,
Erwin
mdwatts
03-04-2004, 06:17 PM
Originally posted by kittanl
There is no etc/HOSTNAME file, does this mean I have to create one, in capital letters.
I modified my etc/hosts file, but I don't get an ip-adress from @home.
I'm also running SuSE 9.0 and have /etc/HOSTNAME.
# cat /etc/HOSTNAME
mdw4.mdwsystems.net
Since you are using dhcp, try the first example I posted.
127.0.0.1 localhost.localdomain localhost <your hostname>
Have a look at the comments in /etc/sysconfig/network/dhcp
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.