当前位置: > Linux发行版 > Debian >

Debian下修改IP地址

时间:2015-01-22 02:54来源:linux.it.net.cn 作者:IT

修改/etc/network/interfaces文件:

 

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    address 192.168.0.4
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1

 

修改/etc/resolv.conf文件:

nameserver XXX.XXX.XXX.XXX 

nameserver XXX.XXX.XXX.XXX 

 

 

立即生效运行:

/etc/init.d/networking restart

(责任编辑:IT)
------分隔线----------------------------