美文网首页
ubuntu修改配置静态ip

ubuntu修改配置静态ip

作者: 2young2simple | 来源:发表于2017-12-05 23:51 被阅读0次

Ubuntu配置和修改IP地址

1、修改配置文件/etc/network/interfaces

root@ubuntu:~# sudo gedit /etc/network/interfaces

添加以下内容:

auto eth0                  #设置自动启动eth0接口

iface eth0 inet static    #配置静态IP

address 192.168.11.88      #IP地址

netmask 255.255.255.0      #子网掩码

gateway 192.168.11.1        #默认网关

dns-nameservers 8.8.8.8

2、重启网络,使配置生效

sudo /etc/init.d/networking restart

3、查看ip是否配置成功 root@ubuntu:~# ifconfig

相关文章

网友评论

      本文标题:ubuntu修改配置静态ip

      本文链接:https://www.haomeiwen.com/subject/efwhixtx.html