I have changed the hostname and hosts file in /etc, however my bash prompt has not changed, do I need to restart something (like the OS?) for this to take effect?
migrated from stackoverflow.com Aug 5 '12 at 14:08
|
It depends on your system, but, perhaps, you may want to use the |
|||
|
|
First of all, changing the hostname in /etc/hosts does not actually change the hostname. To change that temporarily, use the Changing the hostname displayed in your bash prompt depends on how your bash prompt is set up. If it reads the hostname on each prompt, it will change the next time you press ENTER. If it only reads the hostname during initialization and stores that in a variable which is then displayed in the prompt, then you |
|||
|
|
|
I believe the hostname is stored in an enviroment variable (called HOSTNAME :<).
It is probably not updated dynamically.However,it is supposed to update when restarting bash. |
|||
|
|