新闻资讯

debian设置IP

2022/8/26 18:31:59 人评论 次浏览

设置ip

/etc/network/interfaces

改为如下

auto eth0 iface eth0 inet static address 192.168.0.190 gateway 192.168.0.1 netmask 255.255.255.0

address:IP地址

gateway:网关

netmask:子网掩码

auto eth0:开机自启

iface eth0 inet static: 静态ip

设置dns

/etc/resolv.conf

改为如下

nameserver 223.5.5.5 nameserver 192.168.0.1

重启并应用

systemctl restart networking


————————————————


相关资讯
    暂无相关...

栏目类别