Article title: modify the IP address of a Linux operating system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Linux ip address modification code
Modify/etc/sysconfig/network-scripts/ifcfg-eth0
> DEVICE = name, where name is the name of the physical DEVICE.
> IPADDR = addr, where addr is an IP address.
> NETMASK = mask, where mask is the network mask value.
> NETWORK = addr, where addr is the NETWORK address.
> BROADCAST = addr, where addr is the BROADCAST address.
> GATEWAY = addr, where addr is the GATEWAY address.
> ONBOOT = answer, where answer is yes (the device is activated during boot) or no (the device is not activated during boot)
> USERCTL = answer, where answer is yes (non-root users can control this device) or no
> BOOTPROTO = proto, where, proto takes one of the following values: none, no protocol used for guidance; static allocation address; bootp, use BOOTP protocol, or dhcp, use DHCP protocol.
The most important thing is to restart the NIC.
/Sbin/service network restart