<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>运达&#039;s  blog &#187; ifconfig</title>
	<atom:link href="https://www.yunda51.com/?feed=rss2&#038;tag=ifconfig" rel="self" type="application/rss+xml" />
	<link>https://www.yunda51.com</link>
	<description>运达的博客</description>
	<lastBuildDate>Wed, 12 Nov 2025 07:58:26 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.19</generator>
	<item>
		<title>centos7没有安装ifconfig命令的解决方法</title>
		<link>https://www.yunda51.com/?p=1757</link>
		<comments>https://www.yunda51.com/?p=1757#comments</comments>
		<pubDate>Sat, 08 Apr 2017 14:43:58 +0000</pubDate>
		<dc:creator><![CDATA[运达]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[ifconfig]]></category>

		<guid isPermaLink="false">http://www.yunda51.com/?p=1757</guid>
		<description><![CDATA[ifconfig命令是设置或显示网络接口的程序，可以显示出我们机器的网卡信息，可是有些时候最小化安装CentO<a href="https://www.yunda51.com/?p=1757" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>ifconfig命令是设置或显示网络接口的程序，可以显示出我们机器的网卡信息，可是有些时候最小化安装CentOS等Linux发行版的时候会默认不安装ifconfig等命令，这时候你进入终端，运行ifconfig命令就会出错</p>
<p><img src="http://www.centoscn.com/uploads/allimg/140916/1-140916011055639.jpg" alt="" /></p>
<p>这是我们首先会想到是不是环境变量里没有ifconfig命令的路径，因为ifconfig是在/sbin路径下的，以root用户登录才可以运行，可是我们上边是以root用户登录的啊，不急，我们来看看root用户的环境变量</p>
<p><img src="http://www.centoscn.com/uploads/allimg/140916/1-1409160111045T.jpg" alt="" /></p>
<p>看到没，我们的环境变量里有/sbin这个路径，也居士说如果ifconfig命令存在并且就是位于/sbin目录下的话我们肯定就是可以运行的，那么我们就看看/sbin目录下有没有ifconfig命令吧</p>
<p><img src="http://www.centoscn.com/uploads/allimg/140916/1-1409160111133I.jpg" alt="" /></p>
<p>结果表明我们的/sbin目录下并没有ifconfig命令，所以我们的结论是：我们的CentOS里边是没有安装ifconf</p>
<p>———————————————分割线是一种态度———————————————</p>
<p>我们的解决办法是：yum安装ifconfig这个命令包</p>
<p><img src="http://www.centoscn.com/uploads/allimg/140916/1-140916011121b0.jpg" alt="" /></p>
<p>看到了吗，bash也是有分割线的，当然这不是在重点，重点是通过yum search 这个命令我们发现ifconfig这个命令是在net-tools.x86_64这个包里，接下来我们安装这个包就行了</p>
<p><img src="http://www.centoscn.com/uploads/allimg/140916/1-14091601113O16.jpg" alt="" /></p>
<p>这是我们已经安装好ifconfig这个命令了，我们试一下</p>
<p><img src="http://www.centoscn.com/uploads/allimg/140916/1-14091601114B10.jpg" alt="" /></p>
<p>成功运行了，这时候你是不是和我当初一样有疑惑，windows里的ipconfig命令到了linux为什么有事还不是必须安装的，博主看了一下资料，原来ifconfig命令来源于net-tools，这个包里有ifconfig，netstat，whois等命令，所以之前这些命令你都是运行不了的。</p>
<p>转载请注明转自:<a href="http://www.yunda51.com">运达's blog</a> 原文地址：<a href="http://www.yunda51.com/1757.html">http://www.yunda51.com/1757.html</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.yunda51.com/?feed=rss2&#038;p=1757</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
