Change hostname and IP address of Linux server without rebooting server

You can change option in third line in /etc/hosts file on Linux server without rebooting; /etc/hosts localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 seimaxim You can change all of the following options in /etc/sysconfig/network without reboot. /etc/sysconfig/network NETWORKING=yes GATEWAY= Similarly options in /etc/sysconfig/network-scripts/ifcfg-eth0 can also be changed. /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR= NETMASK= Hostname of server can be changed with; hostname Restart network with; systemctl restart network

Leave a Reply

Your email address will not be published. Required fields are marked *