首页 > 系统 > Linux >

Ubuntu虚拟机固定ip地址

2016-12-06

Ubuntu虚拟机固定ip地址。环境为VirtualBox+Ubuntu Server,1 修改 etc network interface。

环境为VirtualBox+Ubuntu Server

1.修改/etc/network/interface

# 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
auto eth0
iface eth0 inet static
address 192.168.0.180
gateway 192.168.0.1 #这个地址你要确认下 网关是不是这个地址
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

2.配置DNS
hadoop@master:~$ cat /etc/resolvconf/resolv.conf.d/base 
nameserver 8.8.8.8

相关文章
最新文章
热点推荐