Re: changing linux hostname without rebooting

From: Peter T. Breuer (ptb_at_oboe.it.uc3m.es)
Date: 10/09/03


Date: Thu, 9 Oct 2003 21:03:33 +0200

Tony <tonyw@suse.stanford.edu> wrote:
> How can I change the prompt of the linux hostname (REDHAT) without rebooting

The prompt is your PS1 variable. Change it any way you like.

> I already changed /etc/hosts

But why? That doesn't determine your hostname! CHANGE IT BACK!!!!! AT
ONCE!!!

Where do you (and other people) get the WEIRD idea from that changing
/etc/hosts will change your hostname? Does anything tell you so? No?
Will it mess up your networking? Yes. So WHY DO IT?

If you want to change your hostname, change it. Man hostname.

Peter



Relevant Pages

  • Re: problem with terminal location
    ... BASH, or Unix expert by any stretch of the imagination. ... You can see what the system things is your hostname using the ... Is it just the prompt or is it your hostname that is the problem? ... you get your IP address via DHCP, then you do not have an official ...
    (comp.sys.mac.misc)
  • Re: Unusual termianl prompt?
    ... the hostname is there or not?? ... I have a system that shows the prompt as ... Jiyo cricket on Yahoo! ...
    (Fedora)
  • Re: host name
    ... The hostname will change on the next ... reboot. ... If you must change it NOW, as root: ... Your prompt won't change until you log out and log in again since the ...
    (Fedora)
  • Re: sys-unconfig (does not prompt for new values upon rebooting
    ... setup info, hostname, ip, gateway etc, but instead it just boots to a ... login prompt with an unknown hostname. ...
    (comp.unix.solaris)
  • Re: (was Re: setting FQDN in /etc/hosts)
    ... Only because I uncommented the hostname setting of the ... changes to the hostname setting within leafnode's ... It would be easier to spot where your leafnode is getting the system ... being) and show us what happens to the prompt: ...
    (news.software.readers)