Ubuntu设置静态IP
2013-11-24 19:57
274 查看
linux系统安装完之后一般都是动态方式链接的,使用静态IP方式而直接修改配置文件(不建议在图形界面下修改):
1、编辑文档/etc/network/interfaces:
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:
------------------------------------------------
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.116
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
------------------------------------------------
2、设置DNS:
修改么/etc/resolv.conf文件:
#search
test.com
nameserver 192.168.0.1
3、最后使网络配置生效:
sudo /etc/init.d/networking restart
1、编辑文档/etc/network/interfaces:
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:
------------------------------------------------
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.116
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
------------------------------------------------
2、设置DNS:
修改么/etc/resolv.conf文件:
#search
test.com
nameserver 192.168.0.1
3、最后使网络配置生效:
sudo /etc/init.d/networking restart
相关文章推荐
- 【Linux】Ubuntu设置静态IP
- ubuntu修改静态IP、设置dns地址
- ubuntu14.04设置静态ip
- 在Ubuntu 12.04.1中设置静态IP
- 关于ubuntu下设置静态IP,而且也设置了DNS服务后,仍然无法上网的问题
- ubuntu下设置静态ip 问题
- ubuntu设置静态ip
- ubuntu14.04 ssh 远程连接和静态ip的设置
- ubuntu设置静态IP
- 虚拟机ubuntu14.04系统设置静态ip
- Ubuntu设置静态IP和DNS
- ubuntu下设置静态ip 问题
- ubuntu 14.04 设置静态ip
- VMware ubuntu 设置静态IP
- Ubuntu下设置通过NAT方式上网(静态IP)
- Ubuntu局域网中设置代理服务器上网和设置静态IP
- ubuntu 设置静态IP的实现方法
- Ubuntu10.04 设置静态IP
- ubuntu14.04设置静态ip
- ubuntu中设置静态IP和MAC地址,重启不影响