July 15

nmcli/NetworkManager add/remove IPs

In this example we are adding IP 192.168.1.235 (also we mention GW and DNS for it ) and removing the IP 192.168.1.233

nmcli connection modify ens18 ipv4.addresses 192.168.1.235/24 ipv4.gateway 192.168.1.1 ipv4.dns 8.8.8.8,1.1.1.1
nmcli connection modify ens18 -ipv4.addresses 192.168.1.233
service NetworkManager restart
nmcli connection reload


Copyright 2021. All rights reserved.

Posted 15 July 2025 by admin in category "simple memo

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.