您的位置:首页 > 理论基础 > 计算机网络

ubuntu 16.04 设置固定IP

2017-12-01 14:37 375 查看
配置固定IP

sudo vim /etc/network/interfaces
# 修改打开的文件 The primary network interface下的配置
auto enp0s3
# 设置静态方式
iface enp0s3 inet static
# 设置IP地址
address 192.168.0.88
# 设置子网掩码
netmask 255.255.255.0
# 设置网关地址
gateway 192.168.0.1


2.配置DNS

sudo vim /etc/resolvconf/resolv.conf.d/base
# 写入DNS配置 配置为你的DNS 保存退出
nameserver 8.8.8.8
nameserver 114.114.114.114


3.重启

reboot
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ubuntu 网络