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.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You should change that either in the frontend of your choice or with
nmcli con mod name ipv4.addresses ip
name with the connection name and
ip with the desired ip address.
For more documentation visit: https://wiki.archlinux.org/index.php/NetworkManager
turning it off with:
nmcli networking off
then back on again with:
nmcli networking on
nmcli connection reload
nmcli con down eth0
nmcli con up eth0
Or you can use
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.