Ubuntu修改网卡配置文件:
vim /etc/network/interfaces<pre name="code" class="plain">cat /etc/network/interfaces
auto eth0 iface eth0 inet static address 192.168.1.41 gateway 192.168.1.1 netmask 255.255.255.0 dns-nameserver 114.114.114.114
然后重启网卡:
ifdown eth0 ifup eth0
时间: 2024-10-09 22:05:22