美文网首页
Ubuntu 配置静态IP

Ubuntu 配置静态IP

作者: 一杉风雨 | 来源:发表于2018-10-03 18:34 被阅读0次

步骤

  1. 配置IP
tee /etc/network/interfaces <<-'EOF'
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.11
gateway 192.168.1.1
netmask 255.255.255.0
EOF
  1. 配置DNS
tee /etc/resolvconf/resolv.conf.d/base <<-'EOF'
nameserver 192.168.1.1
EOF
  1. 配置hostname(如果需要)
tee /etc/hostname <<-'EOF'
rain-host
EOF
  1. 重启网络
service network restart

相关文章

网友评论

      本文标题:Ubuntu 配置静态IP

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