Tag:
hostname
Having a clone of a particular VM is helpful whether you want to keep a backup vanilla image to use in the future, or create a cluster of identical machines that can run in parallel. This process is not well documented and can be slightly tricky. Hopefully this guide will help many of you through [...]
Changing the hostname on a RHEL box is fairly straightforward if you perform the following steps. First change the HOSTNAME line in /etc/sysconfig/network Then change the hostname in /etc/hosts From here you can either reboot for the changes to take effect or do the following two steps. Force the system to start using the hostname. [...]
Here is a good way to determine the hostname and IP address of the local machine in C. You first have to grab the hostname with gethostname(). char hostbuf[256]; gethostname(hostbuf,sizeof(hostbuf)); Take the hostname and use it to grab the hostent struct with gethostbyname(). struct hostent *hostentry; hostentry = gethostbyname(hostbuf); Finally you have to take the [...]