hack3rcon wrote: ↑2023/07/29 05:02:14
In which file does this command write the settings?
How do I delete the added IP?
In whatever file the NetworkManager does use for storing the config. We supposedly don't need to know.
(The rationale is that the tools, like nmcli, do use proper syntax in file -- something that humans can fail to do.)
Up to EL8 the NM did use the legacy RH's initscripts config syntax and files (for most connections).
In EL9 NM uses it's own, new config file format and location.
AFAIK, there are two possibilities:
1. Since ipv4.addresses is a list, a remove from list should function:
Code: Select all
nmcli con mod eth0 -ipv4.addresses "1.2.3.5/24"
(This should leave 1.2.3.4/24 and 1.2.3.6/24.)
2. The other option is to set the addresses that you want:
Code: Select all
nmcli con mod eth0 ipv4.addresses "1.2.3.4/24"
You can see the defined connections with
nmcli con show
You can see the details of connection "eth0" with
nmcli con show eth0