ifconfig -a --查看本机IP地址
vim /etc/network/interfaces
# 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 dhcp
iface eth0 inet static
address 172.19.254.66
mask 255.255.0.0
gateway 172.19.0.1
dns-nameserver 172.16.0.10
dns-nameserver 172.19.20.76
dns-nameserver 114.114.114.114
网友评论