0

Change IPADDR=192.168.1.120 to IPADDR=192.168.1.121

Then run:

systemctl restart NetworkManager

ip addr is still 192.168.1.120

if i run systemctl restart network,it works fine.

But network-scripts is deprecated in centos8.

1

You should change that either in the frontend of your choice or with nmcli:

nmcli con mod name ipv4.addresses ip

(substitute name with the connection name and ip with the desired ip address.

For more documentation visit: https://wiki.archlinux.org/index.php/NetworkManager

| improve this answer | |
1

turning it off with:

nmcli networking off

then back on again with:

nmcli networking on

Or

nmcli connection reload

Or

nmcli con down eth0

nmcli con up eth0

Or you can use nmtui

nmtui is a text based user interface for controlling network manager, when we execute nmtui, it will open a text base user interface through which we can add, modify and delete connections.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.