ens160为我的网卡名称
1
|
vim /etc/NetworkManager/system-connections/ens160.nmconnection
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[connection]
id=ens160
uuid=efb3926c-387d-3dcf-b732-9cb06feb2955
type=ethernet
autoconnect-priority=-999
interface-name=ens160
timestamp=1663499850
[ethernet]
[ipv4]
address1=192.168.50.82/24,192.168.50.1
dns=8.8.8.8;1.1.1.1;
may-fail=false
method=manual
[proxy]
|
1
|
nmcli connection load /etc/NetworkManager/system-connections/ens160.nmconnection
|
1
|
nmcli connection up /etc/NetworkManager/system-connections/ens160.nmconnection
|
ping、ip a等方法
查询UUID
NAME UUID TYPE DEVICE
ens160 efb3926c-387d-3dcf-b732-9cb06feb2955 ethernet ens160
docker0 22323652-5f33-444f-bdb2-2f63e839c915 bridge docker0