Debian怎么配置网卡(IP)

2024-10-11 23:42:25

1、将用户当前目录切换到网卡配置文件所在的目录,网卡配置文件所在的目录为“/etc/network/”。使用“cd /etc/network”命令切换到网卡配置文件所在目录。

Debian怎么配置网卡(IP)

3、静态ip网卡配置文件的“auto eth0”表示网卡随系统自动请;“iface eth0 inet static”表示网卡为静态ip地址,“address 192.168.2.147”表示设置ip地址,“netmask 255.255.255.0”表示子网掩码;“gateway 192.168.2.1”表示网关。

Debian怎么配置网卡(IP)

5、使用“/etc/init.d/networking restart”命令使用网卡配置文件内容生效,并使用“ifconfig”命令查看网卡eth0网卡的ip地址。

Debian怎么配置网卡(IP)Debian怎么配置网卡(IP)
猜你喜欢