Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
SDN 101: An Introduction to Software Defined Networking
Discover the advantages of SDN.
SDN has quickly become one of the hottest trends in IT. But not all SDN solutions offer real software-defined functionality. As more enterprises consider SDN, they want to know, “What is SDN? And what are the real benefits?” If you're ready to explore the advantages of SDN, and want to know how it should be implemented within your enterprise, start by reading our introductory white paper.
Click Here to receive this Complete Guide absolutely free.
Anyone have an explanation?
Why is it when I type "hostname (aNewName)" the $HOSTNAME environment variable doesn't change as well?
The change is only reflected if i type "uname -a"
I ask this because when linux boots up, ifup runs the function, need_hostname from the file, /etc/sysconfig/network-scripts/network-functions, and i believe it uses the shell command hostname to determine if it needs to set a variable called $NEEDHOSTNAME to 'yes' or to non-existent.
Then, the ifup script uses $NEEDHOSTNAME to determine if it should use the -H option when running dhcpcd.
The -H option is different from the -h option. -H sets my machine's $HOSTNAME and the value returned from typing hostname to one supplied by my ISP's dhcp server.
Anyway, my machine was previously able to boot up, obtain an IP from my ISP's dhcp server and not change my $HOSTNAME or the value returned from typing hostname. I think the value returned from typing "hostname" has something to do with it. It may have prevented ifup from using the -H option when executing dhcpcd.
I'd like to be able to boot and obtain an IP without changing my hostname. I know I can do this by commenting out the section in ifup that has the -H option when executing dhcpcd. But i'd like to avoid editing these original scripts.