ubuntu配置静态ip(同时可以上网)
为在设置有线网卡IP同时不影响无线网络,思想是不设置有线网网关;
我的有线网卡为 enp6s0
想要设置其IP为192.168.100.100
sudo gedit /etc/network/interfaces
在文件后加入
auto enp6s0
iface enp6s0 inet static
address 192.168.100.100
netmask 255.255.255.0
broadcast 192.168.100.255
不要加入 gateway
重启即可。
还没有评论,来说两句吧...