How do you assign an IP address to a hostname in Linux?
Answer
I. Change HostName From Command Line
Answer
I. Change HostName From Command Line
- Use hostname command to Change Hostname.
- Modify the /etc/hosts file.
- Modify the /etc/sysconfig/network file.
- Restart the Network.
- Change ip-address Temporarily Using ifconfig.
- Change ip-address Permanently.
- Modify /etc/hosts file.
- Restart the Network.