Huỳnh Hiền
New member
How do you assign an IP address to a hostname in Linux?
Answer
How to Change HostName and IP-Address in CentOS / RedHat Linux
Answer
How to Change HostName and IP-Address in CentOS / RedHat Linux
- Use hostname command to Change Hostname. In this example, we’ll change the hostname from dev-server to prod-server. …
- 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.