CentOS 7 virtual machine modify IP address

Time:2020-8-1

1. View current IP address

ip addr

CentOS 7 virtual machine modify IP address

The current IP address of my virtual machine is 192.168.0.130

2. Open the / etc / sysconfig / network scripts directory

cd /etc/sysconfig/network-scripts

CentOS 7 virtual machine modify IP address

3. Modify ifcfg-ens33 file, modify IPADDR to a new IP address, save and exit

CentOS 7 virtual machine modify IP address

vim ifcfg-ens33

CentOS 7 virtual machine modify IP address

4. Restart network service

service network restart

CentOS 7 virtual machine modify IP address

5. IP address change complete

CentOS 7 virtual machine modify IP address