备份配置
cp /etc/network/interfaces /etc/network/interfaces.bak1
编辑
vi /etc/network/interfaces
如果从来没设置过,在文件末尾添加(需要根据路由情况设置下面地址,参考已经连接上这个路由的电脑或者手机即可)
address 192.168.1.104 gateway 192.168.1.1 netmask 255.255.255.0 network 192.168.1.1 broadcast 192.168.1.255
完整的配置文件
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface #NetworkManager#auto eth0 #NetworkManager#iface eth0 inet dhcp auto eth0 iface eth0 inet static address 192.168.1.104 gateway 192.168.1.1 netmask 255.255.255.0 network 192.168.1.1 broadcast 192.168.1.255
已有 334 位网友参与,快来吐槽:
发表评论