Ubuntu 1404设置静态IP
来源:互联网 发布:linux jdk 降级 编辑:程序博客网 时间:2024/06/15 18:26
编辑修改interfaces文件
sudo 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 interfaceauto loiface lo inet loopback# The primary network interfaceauto eth0#——————shielding DHCP#iface eth0 inet dhcp#——————add your setting hereiface eth0 inet staticaddress 192.168.1.214gateway 192.168.1.1netmask 255.255.255.0network 192.168.1.0broadcast 192.168.1.255
修改DNS
resolv.conf 这个文件DHCP获取后自动改写,这里我没有修改,原来已经通过DHCP获取了一个,贸然填上8.8.8.8谷歌的,可能还会缓慢
sudo vim /etc/resolv.conf# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTENnameserver 49.223.187.120nameserver 175.190.255.50search DHCP HOST
重启网卡
一般使用
sudo service networking restart
或者
sudo /etc/init.d/networking restart
这两个命令都可以重启网卡,重新载入配置,但是在这个Ubuntu 1404 server版本中,没有任何反应,还是原来DHCP获取的IP,通过关闭和开启网卡可以,没有搞清楚原因
ifconfig eth0 downifconfig eth0 up
阅读全文
0 0
- Ubuntu 1404设置静态IP
- ubuntu设置静态IP
- Ubuntu设置静态IP
- Ubuntu设置静态 IP
- ubuntu ip静态设置
- Ubuntu设置静态IP
- ubuntu 设置静态IP
- Ubuntu静态IP设置
- ubuntu 设置静态ip
- ubuntu设置静态ip
- ubuntu设置静态ip
- Ubuntu设置静态 IP
- ubuntu设置静态ip
- ubuntu设置静态IP
- ubuntu 设置静态ip
- Ubuntu设置静态IP
- ubuntu静态IP设置
- 设置ubuntu静态IP
- Python基础03 注释
- Java递归
- POJ 1459 Power Network(网络流)
- CodeForces
- Scrapy框架小例入门
- Ubuntu 1404设置静态IP
- HDU 畅通工程
- Python基础04 运算符
- css中文本元素字体格式(Font-family)的编码
- Quartz定时调度器03
- spring bean的加载过程
- eclipse 上操作git
- PAT练习(3)-1021 Set Similarity
- HDU 6127 Hard challenge【计算机几何】【思维题】