On Thu, Jan 03, 2002 at 03:13:32PM -0500, Simoncini, Matthew wrote: simoncim> I'm running Red Hat 7.1 at work on my laptop and the IP address is assigned simoncim> via DHCP. If I want to change my hostname from "localhost.localdomain" to simoncim> whatever I please, how do I do it? This depends, do you want to fix it to a value of your own choosing (which may not match the DNS for the IP you get from DHCP), or do you want to have it set to whatever the DHCP server is giving you as a hostname (which will likely match the DNS for the IP it gave you)? For the former, you can set it in the file: /etc/sysconfig/network either add or edit the existing HOSTNAME= line: HOSTNAME=whateveryouwant.domain.com then reboot (which sets the hostname to the above value automatically) or set the hostname manually if you do not wish to reboot: hostname whateveryouwant.domain.com If you want DHCP to set your hostname, there are several options, depending on what DHCP client you are using (pump, dhcpcd, or dhclient). I always recommend dhclient over the other two. You can get it at http://www.isc.org/, or RPM packages for Red Hat 7.1 (recommended) at ftp://angus.ind.wpi.edu/pub/packages/isc/dhcp. Version 3.0 is the latest stable release, and 3.0.1rc4 is the latest release candidate. All you need is dhcp-3.0-1cra.i386.rpm and dhcp-client-3.0-1cra.i386.rpm. Install them like this (as root): rpm -Uvh dhcp-*3.0-1cra.i386.rpm The client package will automatically patch the necessary files in Red Hat (/sbin/ifup and /sbin/ifup if you are curious) to use dhclient before pump and/or dhcpcd if it exists. dhclient from the RPM packages will automatically set your hostname if the hostname is currently null, "(none)", "localhost" or "localhost.localdomain". You can control all sorts of behavior from the configuration file /etc/dhclient.conf. pump and dhcpcd I believe will also set the hostname if the current hostname matches the above list. They are supposed to do this one of two ways: 1. doing a reverse DNS lookup on the IP that DHCP assigns (pump --lookup-hostname or dhcpcd -H). or 2. using the hostname that DHCP passes back (pump -h or dhcpcd -h). You can force behavior 2 by setting the variable DHCP_HOSTNAME to anything in /etc/sysconfig/network: DHCP_HOSTNAME=yes Otherwise /sbin/ifup will use method 1. -- Charles R. Anderson <cra@wpi.edu> / http://angus.ind.wpi.edu/~cra/ PGP Key ID: 49BB5886 Fingerprint: EBA3 A106 7C93 FA07 8E15 3AC2 C367 A0F9 49BB 5886