前提条件是系统必须开启NetworkManager
[root@localhost ~]# nmcli connection show
名称 UUID 类型 设备
eth2 3a73717e-65ab-93e8-b518-24f5af32dc0d 802-3-ethernet eth2
eth1 9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 802-3-ethernet eth1
eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 802-3-ethernet eth0
virbr0-nic 38838d19-44eb-4dda-a920-9a8b9cdd0e0f 802-3-ethernet virbr0-nic
virbr0 708efefa-a240-4b3d-a07c-0ebaec1df4e5 bridge virbr0
eth3 c5ca8081-6db2-4602-4b46-d771f4330a6d 802-3-ethernet eth3
[root@localhost ~]# nmcli connection modify eth1 manual "192.168.2.2/24"