grep -rnw '/etc' -e 'ens160'
然后用vi命令打开文件进行修改vi /etc/NetworkManager/system-connections/ens160.nmconnection
假设将ip地址改为192.168.200.130
- [connection]
- id=ens33
- uuid=0050f214-01a7-395e-ab19-b6e95412995a
- type=ethernet
- autoconnect-priority=-999
- interface-name=ens33
-
- [ipv4]
- address1=192.168.200.130,192.168.200.2 #ip地址,网关
- dns=192.168.200.2 #域名解析器
- method=manual