ubuntu上设置固定IP

现在使用ubuntu的人越来越多了.但是第一个就是设置网络是必需的.在这里教你如何设置固定IP在ubuntu上.

使用root编辑:
#/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

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
        script grep
        map eth0

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
设置完了记得要重启网络.
#/etc/init.d/network restart

原创文章,转载请注明: 转载自PT Ubuntu Blog

本文链接地址: http://www.ptubuntu.com/2008/12/1075.html

Share

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Verify Code   If you cannot see the CheckCode image,please refresh the page again!