After experimenting, here is my GUESS:
"hostname" changes the hostname immediately, whereas "export HOSTNAME=newname" changes the env variable and would become effective on the next reboot (or login??)
If either method is used it does not affect the other.
I have not tested to see what happens on reboot....
|