ubuntu9.04网络配置

来源:互联网 发布:wifi密码备份软件 编辑:程序博客网 时间:2024/05/01 03:01

ubuntu 9.04 网络配置


sudo gedit /etc/network/interfaces

#设置静态IP
auto eth0

iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
#broadcast 192.168.1.255
gateway 192.168.1.1

#设置动态dhcp
auto eth0 inet dhcp

上面两个设置二选一就行了,看哪个适合你。


sudo gedit /etc/resolv.conf

#设置DNS server(可以设置多个)
nameserver 192.168.1.1

#重新设置网络
sudo /etc/init.d/networking restart
原创粉丝点击