大旗谷资源网 Design By www.zqyou.com
Ubuntu 设定静态IP:
切换到root用户,然后进入/etc/network目录。备份interfaces文件(备份文件是一个好习惯)
下面编辑interfaces文件,添加如下语句:
1 # Assgin static IP by eric on 26-SEP-2012 2 iface eth0 inet static 3 address 192.168.196.135 #change to your static IP 4 netmask 255.255.255.0 #change to your netmask 5 gateway 192.168.196.255 #change to your getway 6 #We must specify dns-nameserver here 7 #in order to get internet access from host 8 dns-nameservers 192.168.196.255 9 auto eth0
编辑完成后的interfaces文件内容如下:
root@ubuntu:/etc/network# cat interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback #add by andy at 2014-08-14 # Assgin static IP by eric on 26-SEP-2012 iface eth0 inet static address 192.168.196.135 #change to your static IP netmask 255.255.255.0 #change to your netmask gateway 192.168.196.255 #change to your getway #We must specify dns-nameserver here #in order to get internet access from host dns-nameservers 192.168.196.255 auto eth0
下一步就是重启网卡:
root@ubuntu:/etc/network# /etc/init.d/networking restart 重启完成后,测试一下: root@ubuntu:/etc/network# ping www.baidu.com.cn PING www.a.shifen.com (220.181.112.244) 56(84) bytes of data. 64 bytes from 220.181.112.244: icmp_req=1 ttl=128 time=6.12 ms 64 bytes from 220.181.112.244: icmp_req=2 ttl=128 time=14.7 ms
OK。静态IP设置完成。
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
大旗谷资源网 Design By www.zqyou.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
大旗谷资源网 Design By www.zqyou.com
暂无ubuntu 设置静态IP的实现方法的评论...
更新日志
2024年09月20日
2024年09月20日
- [雨果唱片]李冰《地方民歌·戏曲系列-爱的颂歌》WAV
- 《模拟人生》真人电影官宣!玛格特·罗比担任制片人
- 《星战绝地》系列玩家数超4000万!续作表现超预期
- EA称AI是其业务核心!能提高开发效率、节约成本
- 《十年经典成名好歌 高品质最佳音乐 2CD》[WAV/分轨][1GB]
- 《8个男人的故事 2CD》[WAV/分轨][1GB]
- 《粤语超白金 百听不厌的经典金曲 2CD》[WAV/分轨][1.3GB]
- 群星.1994-全世界精丫华星】【WAV+CUE】
- 杜德伟.1997-知.解2CD【滚石】【WAV+CUE】
- 群星.2022-一不小心喵上你原声大碟【TME影音】【FLAC分轨】
- 《战锤40K星际战士2》卡在正在加入服务器解决方法
- 《勇者斗恶龙怪物仙境3》玩法内容介绍
- 《幸福工厂》无限报错解决方法
- 交错战线原始交易所推荐角色一览
- 战锤40K星际战士2战术职业介绍|战术职业技能效果一览