网卡IP地址配置
/etc/network/interfaces
编辑 文件 sudo vi /etc/network/interfaces
重起 网卡 sudo /etc/init.d/networking restart
# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5). # The loopback network interfaceauto loiface lo inet loopbackaddress 127.0.0.1netmask 255.0.0.0
auto eth0iface eth0 inet dhcp
iface eth1 inet static address 192.168.0.2 netmask 255.255.255.0 gateway 192.168.0.1In this case, you will need to specify your DNS servers manually in /etc/resolv.conf, which should look something like this:
search mydomain.examplenameserver 192.168.0.1nameserver 4.2.2.2
网卡IP地址配置
最新推荐文章于 2025-04-30 08:00:00 发布
本文详细介绍如何在Ubuntu系统中配置网络接口以实现静态IP地址设置。包括编辑/etc/network/interfaces文件来指定IP地址、子网掩码及默认网关,并手动设置DNS服务器等关键步骤。
250

被折叠的 条评论
为什么被折叠?



