[root@centos9 ~]# cat /etc/sysconfig/network-scripts/readme-ifcfg-rh.txt
NetworkManager stores new network profiles in keyfile format in the
/etc/NetworkManager/system-connections/ directory.
Previously, NetworkManager stored network profiles in ifcfg format
in this directory (/etc/sysconfig/network-scripts/). However, the ifcfg
format is deprecated. By default, NetworkManager no longer creates
new profiles in this format.
Connection profiles in keyfile format have many benefits. For example,
this format is INI file-based and can easily be parsed and generated.
Each section in NetworkManager keyfiles corresponds to a NetworkManager
setting name as described in the nm-settings(5) and nm-settings-keyfile(5)
man pages. Each key-value-pair in a section is one of the properties
listed in the settings specification of the man page.
If you still use network profiles in ifcfg format, consider migrating
them to keyfile format. To migrate all profiles at once, enter:
# nmcli connection migrate
This command migrates all profiles from ifcfg format to keyfile
format and stores them in /etc/NetworkManager/system-connections/.
Alternatively, to migrate only a specific profile, enter:
# nmcli connection migrate <profile_name|UUID|D-Bus_path>
For further details, see:
* nm-settings-keyfile(5)
* nmcli(1)
[root@centos9 ~]# cd /etc/NetworkManager/system-connections/
[root@centos9 system-connections]# ls
enp0s3.nmconnection
[root@centos9 system-connections]# cat enp0s3.nmconnection
[connection]
id=enp0s3
uuid=5fcce78a-9f96-497b-acdc-49a613f23f50
type=ethernet
interface-name=enp0s3
[ethernet]
[ipv4]
address1=192.168.1.99/24,192.168.1.1
dns=8.8.8.8;8.8.4.4;
method=manual
[ipv6]
addr-gen-mode=eui64
method=auto
[proxy]
[root@centos9 system-connections]#
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。