一、centos7更改网卡名称eth0
<h1>
<span class="link_title"><a href="/fanhonooo/article/details/53494100">
Centos7更改网卡名称Eth0
</a>
</span>
</h1>
<div class="article_manage clearfix">
<div class="article_l">
<span class="link_categories">
标签:
<a href="http://www.csdn.net/tag/Centos7%e6%9b%b4%e6%94%b9%e7%bd%91%e5%8d%a1%e5%90%8d%e7%a7%b0" target="_blank" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_tag']);">Centos7更改网卡名称</a>
</span>
</div>
<div class="article_r">
<span class="link_postdate">2016-12-06 21:55</span>
<span class="link_view" title="阅读次数">8737人阅读</span>
<span class="link_comments" title="评论次数"> <a href="#comments" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_pinglun'])">评论</a>(1)</span>
<span class="link_collect tracking-ad" data-mod="popu_171"> <a href="javascript:void(0);" onclick="javascript:collectArticle('Centos7%e6%9b%b4%e6%94%b9%e7%bd%91%e5%8d%a1%e5%90%8d%e7%a7%b0Eth0','53494100');return false;" title="收藏" target="_blank">收藏</a></span>
<span class="link_report"> <a href="#report" onclick="javascript:report(53494100,2);return false;" title="举报">举报</a></span>
</div>
</div> <style type="text/css">
.embody{
padding:10px 10px 10px;
margin:0 -20px;
border-bottom:solid 1px #ededed;
}
.embody_b{
margin:0 ;
padding:10px 0;
}
.embody .embody_t,.embody .embody_c{
display: inline-block;
margin-right:10px;
}
.embody_t{
font-size: 12px;
color:#999;
}
.embody_c{
font-size: 12px;
}
.embody_c img,.embody_c em{
display: inline-block;
vertical-align: middle;
}
.embody_c img{
width:30px;
height:30px;
}
.embody_c em{
margin: 0 20px 0 10px;
color:#333;
font-style: normal;
}
</style>
<script type="text/javascript">
$(function () {
try
{
var lib = eval("("+$("#lib").attr("value")+")");
var html = "";
if (lib.err == 0) {
$.each(lib.data, function (i) {
var obj = lib.data[i];
//html += '<img src="' + obj.logo + '"/>' + obj.name + " ";
html += ' <a href="' + obj.url + '" target="_blank">';
html += ' <img src="' + obj.logo + '">';
html += ' <em><b>' + obj.name + '</b></em>';
html += ' </a>';
});
if (html != "") {
setTimeout(function () {
$("#lib").html(html);
$("#embody").show();
}, 100);
}
}
} catch (err)
{ }
});
</script>
<div class="category clearfix">
<div class="category_l">
<img src="http://static.blog.csdn.net/images/category_icon.jpg">
<span>分类:</span>
</div>
<div class="category_r">
<label onclick="GetCategoryArticles('6072191','fanhonooo','top','53494100');">
<span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_fenlei']);">linux<em>(6)</em></span>
<img class="arrow-down" src="http://static.blog.csdn.net/images/arrow_triangle _down.jpg" style="display:inline;">
<img class="arrow-up" src="http://static.blog.csdn.net/images/arrow_triangle_up.jpg" style="display:none;">
<div class="subItem">
<div class="subItem_t"><a href="http://blog.csdn.net/fanhonooo/article/category/6072191" target="_blank">作者同类文章</a><i class="J_close">X</i></div>
<ul class="subItem_l" id="top_6072191">
</ul>
</div>
</label>
</div>
</div>
<div class="bog_copyright">
<p class="copyright_p">版权声明:本文为博主原创文章,未经博主允许不得转载。</p>
</div>
安装完Centos7系统,网卡命名跟之前发生了变化,例如!
就是看着不爽也不会影响使用,只是个网卡名称而已。
eno16777736
1.
先编辑网卡的配置文件将里面的NAME DEVICE项修改为eth0
vim
/etc/sysconfig/network-scripts/ifcfg-eno16777736
2.
重命名该配置文件。
[root@localhost
yum.repos.d]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# mv ifcfg-eno16777736 ifcfg-eth0
3.
禁用该可预测命名规则。对于这一点,你可以在启动时传递“net.ifnames=0 biosdevname=0 ”的内核参数。这是通过编辑/etc/default/grub并加入“net.ifnames=0 biosdevname=0
”到GRUBCMDLINELINUX变量来实现的。
[root@localhost
network-scripts]# vim /etc/default/grub
4.
运行命令grub2-mkconfig
-o /boot/grub2/grub.cfg 来重新生成GRUB配置并更新内核参数。
[root@localhost
network-scripts]# grub2-mkconfig -o /boot/grub2/grub.cfg
5.重新启动机器,启动完之后网卡名称就变成了Eth0
[root@localhost
network-scripts]# init 6
重启完之后,验证!
重启系统,验证!
技术一般 水平有限 还望以后大家多多指点!
<div id="digg" articleid="53494100">
<dl id="btnDigg" class="digg digg_disable" onclick="btndigga();">
<dt>顶</dt>
<dd>2</dd>
</dl>
<dl id="btnBury" class="digg digg_disable" onclick="btnburya();">
<dt>踩</dt>
<dd>0</dd>
</dl>
</div>
<div class="tracking-ad" data-mod="popu_222"><a href="javascript:void(0);" target="_blank"> </a> </div>
<div class="tracking-ad" data-mod="popu_223"> <a href="javascript:void(0);" target="_blank"> </a></div>
<script type="text/javascript">
function btndigga() {
$(".tracking-ad[data-mod='popu_222'] a").click();
}
function btnburya() {
$(".tracking-ad[data-mod='popu_223'] a").click();
}
</script>
- 上一篇mogilefs
- 下一篇Zabbix-3.0安装
<div style="clear:both; height:10px;"></div>
<div class="similar_article">
<h4></h4>
<div class="similar_c" style="margin:20px 0px 0px 0px">
<div class="similar_c_t">
相关文章推荐
</div>
<div class="similar_wrap tracking-ad" data-mod="popu_36" style="max-height:250px">
<ul class="similar_list fl">
<li>
<em>•</em>
<a href="http://blog.csdn.net/yuanyuan_186/article/details/8759182" title="dhcpd提示No subnet declaration for eth0的解决方法" strategy="BlogCommendFromBaidu_0" target="_blank">dhcpd提示No subnet declaration for eth0的解决方法</a>
</li>
<li>
<em>•</em>
<a href="http://edu.csdn.net/huiyiCourse/series_detail/68?utm_source=wx2" title="用户画像系统应用与技术解析--汪剑" strategy="undefined" target="_blank">用户画像系统应用与技术解析--汪剑</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/gzhouc/article/details/53573219" title="CentOS 7 修改网卡名称为 eth0" strategy="BlogCommendFromCsdn_1" target="_blank">CentOS 7 修改网卡名称为 eth0</a>
</li>
<li>
<em>•</em>
<a href="http://edu.csdn.net/huiyiCourse/series_detail/70?utm_source=blog7" title="2017 求职面试集训营之VIP服务版--刘道宽" strategy="undefined" target="_blank">2017 求职面试集训营之VIP服务版--刘道宽</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/johnnycode/article/details/40624403" title="Centos 7 学习之静态IP设置" strategy="BlogCommendFromBaidu_2" target="_blank">Centos 7 学习之静态IP设置</a>
</li>
<li>
<em>•</em>
<a href="http://edu.csdn.net/course/detail/5116?utm_source=blog7" title="如何优雅地编写Java" strategy="undefined" target="_blank">如何优雅地编写Java</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/sunny05296/article/details/60966809" title="虚拟机添加网卡后Centos7无网卡配置文件的问题" strategy="BlogCommendFromBaidu_3" target="_blank">虚拟机添加网卡后Centos7无网卡配置文件的问题</a>
</li>
<li>
<em>•</em>
<a href="http://edu.csdn.net/course/detail/5337?utm_source=blog7" title="MySQL特性详解" strategy="undefined" target="_blank">MySQL特性详解</a>
</li>
</ul>
<ul class="similar_list fr">
<li>
<em>•</em>
<a href="http://blog.csdn.net/rachel_luo/article/details/18734879" title="linux/centos如何查看网卡信息" strategy="BlogCommendFromBaidu_4" target="_blank">linux/centos如何查看网卡信息</a>
</li>
<li>
<em>•</em>
<a href="http://edu.csdn.net/course/detail/4582?utm_source=blog7" title="React全家桶之Web基础应用" strategy="undefined" target="_blank">React全家桶之Web基础应用</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/henulwj/article/details/47061023" title="centos7修改网卡名" strategy="BlogCommendFromBaidu_5" target="_blank">centos7修改网卡名</a>
</li>
<li>
<em>•</em>
<a href="http://edu.csdn.net/course/detail/6143?utm_source=blog7" title="OpenStack从入门到放弃" strategy="undefined" target="_blank">OpenStack从入门到放弃</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/cmqwan/article/details/61250037" title="linux--centos7更改网卡名称eth0" strategy="BlogCommendFromBaidu_6" target="_blank">linux--centos7更改网卡名称eth0</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/xiegh2014/article/details/51526411" title="CentOS7修改网卡为eth0" strategy="BlogCommendFromBaidu_7" target="_blank">CentOS7修改网卡为eth0</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/u012758088/article/details/71075444" title="Linux问题—Centos7更改网卡名称Eth0" strategy="BlogCommendFromCsdn_8" target="_blank">Linux问题—Centos7更改网卡名称Eth0</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/gzhouc/article/details/53573219" title="CentOS 7 修改网卡名称为 eth0" strategy="BlogCommendFromCsdn_9" target="_blank">CentOS 7 修改网卡名称为 eth0</a>
</li>
</ul>
</div>
</div>
</div>
<div>
<!-- 广告位:PC端-博客内容页-banner1-960*90 -->
<!-- 广告位:PC端-博客详情页底部banner-960*90 -->
<script>
(function() {
var s = "_" + Math.random().toString(36).slice(2);
document.write('<div id="' + s + '"></div>');
(window.slotbydup=window.slotbydup || []).push({
id: '4770928',
container: s,
size: '960,90',
display: 'inlay-fix'
});
})();
</script><div id="_01u9k8s6fpnr"></div><script charset="utf-8" src="http://pos.baidu.com/pcsm?di=4770928&dri=0&dis=0&dai=0&ps=2973x286&dcb=___adblockplus&dtm=SSP_JSONP&dvi=0.0&dci=-1&dpt=none&tsr=0&tpr=1508737642691&ti=Centos7%E6%9B%B4%E6%94%B9%E7%BD%91%E5%8D%A1%E5%90%8D%E7%A7%B0Eth0%20-%20FanHongtao%E7%9A%84%E5%8D%9A%E5%AE%A2%20-%20CSDN%E5%8D%9A%E5%AE%A2&ari=2&dbv=2&drs=1&pcs=1349x700&pss=1349x2989&cfv=0&cpl=5&chi=1&cce=true&cec=UTF-8&tlm=1508737643&rw=700&ltu=http%3A%2F%2Fblog.csdn.net%2Ffanhonooo%2Farticle%2Fdetails%2F53494100&ltr=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DaA-Quc2bM8QKjMNyofJGTWwYpYDKjQC0mPq1lyELTlob6I2l3orEZQyv_P7ukX0wLnUDeY-r-7u5ETQ8cQgFnwGCBLUvK5Dq7AspocwfDXu%26wd%3D%26eqid%3Dcf3306d40000003f0000000359ed8266&lcr=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DaA-Quc2bM8QKjMNyofJGTWwYpYDKjQC0mPq1lyELTlob6I2l3orEZQyv_P7ukX0wLnUDeY-r-7u5ETQ8cQgFnwGCBLUvK5Dq7AspocwfDXu%26wd%3D%26eqid%3Dcf3306d40000003f0000000359ed8266&ecd=1&uc=1366x768&pis=-1x-1&sr=1366x768&tcn=1508737643"></script><div style="width: 100%;"><p style="display:none;"></p><iframe width="960" frameborder="0" height="90" scrolling="no" src="http://pos.baidu.com/s?hei=90&wid=960&di=u3118072&ltu=http%3A%2F%2Fblog.csdn.net%2Ffanhonooo%2Farticle%2Fdetails%2F53494100&dtm=HTML_POST&dai=2&pss=1349x3224&pis=-1x-1&dc=2&cja=false&tlm=1508737643&col=zh-CN&tpr=1508737643281&par=1366x768&cfv=0&dri=1&ltr=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DaA-Quc2bM8QKjMNyofJGTWwYpYDKjQC0mPq1lyELTlob6I2l3orEZQyv_P7ukX0wLnUDeY-r-7u5ETQ8cQgFnwGCBLUvK5Dq7AspocwfDXu%26wd%3D%26eqid%3Dcf3306d40000003f0000000359ed8266&cpl=5&exps=111000&cdo=-1&drs=1&ccd=24&ant=0&cec=UTF-8&cmi=7&psr=1366x768&chi=1&ti=Centos7%E6%9B%B4%E6%94%B9%E7%BD%91%E5%8D%A1%E5%90%8D%E7%A7%B0Eth0%20-%20FanHongtao%E7%9A%84%E5%8D%9A%E5%AE%A2%20-%20CSDN%E5%8D%9A%E5%AE%A2&dis=0&ps=2973x286&pcs=1349x700&ari=2&tcn=1508737644&cce=true"></iframe></div><script type="text/javascript" src="http://mpb1.iteye.com/avneexbwkycx.js"></script>
</div>
<!-- 广告位开始 -->
<!-- 广告位结束 -->
查看评论
您还没有登录,请[登录]或[注册]
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
<div id="ad_bot">
</div>
<a id="quick-reply" class="btn btn-top q-reply" title="快速回复" style="display:none;">
<img src="http://static.blog.csdn.net/images/blog-icon-reply.png" alt="快速回复">
</a>
<a id="d-top-a" class="btn btn-top backtop" style="display: none;" title="返回顶部" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_huidaodingbu'])">
<img src="http://static.blog.csdn.net/images/top.png" alt="TOP">
</a>
<div class="clear">
</div>
</div>