RH hostname (was: Taking Grep to a Lower Level)

Tom Emerson plug-discuss@lists.plug.phoenix.az.us
Tue, 5 Nov 2002 16:19:14 -0700 (MST)


George, you want to change a redhat hostname?

Edit the /etc/sysconfig/network file.

example file:
tom@betty$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=betty.home.lan

after the next reboot, the new name will "stick".
edit the file, then use the 'hostname' command to change it on the fly.  
If you need the mail 'server' to learn the new name, stop/start the daemon 
and it'll probably learn the new name just fine without a reboot.

Check the /etc/hosts file too, it'll probably need an edit as well...
Update your DNS if needed too...

Umm, should ask you this, is this host getting it's IP assignment from 
DHCP, or is it a staticically assigned IP?  I think RH's DHCP client may 
set/change your hostname if the blurb from the DHCP server contains that 
info.  If DHCP trips you up, there is a tweek to config so it won't (at 
least there was the last time I had to work with DHCP on RH ... long time 
ago)

 - tom e.



On Tue, 5 Nov 2002, George Gambill wrote:

> Need to change the "computer name" without reloading RH 7.2.
> 
> Looking at the man pages for Grep, it (grep) seems to only look in the
> current directory.
> 
> How can I grep 'ComputerName' through all subdirectories?
> 
> Thnx
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change  you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>