ifconfig: command not found(CentOS专版,其余的能够参考)

ifconfig: command not foundhtml

查看path配置(echo至关于c中的printf,C#中的Console.WriteLine)bash

echo $PATH 

 

解决方案1:先看看是否是root用户,若是不是就 su 切换到root用户网络

su工具

解决方案2:(若是没看见 /sbin)【咱们这显然不是这个问题】ui

这个通常都是由于配置没弄好,永久解决:spa

打开/etc/profile文件,在其中输入export PATH=$PATH:/sbin.net

 

解决方案3:(CentOS后来换指令了,看看咱们是否是【ifconfig==>ip】)3d

在 /(根目录)里面查找 name(名字)是 ifconfig 的东东htm

说明ifconfig真的换了,淡定blog

看看信息

 ip addr

发现木有(看 2:eth0 没有ipv4)

跳转到 /etc/sysconfig/network-scripts 目录

cd /etc/sysconfig/network-scripts

用vi打开 ifcfg-eth0 (你的多是eth1,或者其余,不是每一个电脑都是这个的)【若是想改为这个能够参考:http://jingyan.baidu.com/article/7f41ecec1b022e593d095c1e.html

i 进去编辑模式 ,修改箭头处,而后按 esc 退回命令模式,输入:wq 并回车

重启一下 

reboot

用root用户登录后 输入 

ip addr

成功!!

 

解决方案4:(网络)

http://blog.sina.com.cn/s/blog_946cb2b70100wx2j.html

 

yum install setuptool安装setup,不过安装后使用运行setup只有Authentication configuration可用。

如想配置IP,安装system-config-network-tui便可。

yum install system-config-firewall-tui安装图形化Firewall配置工具。

yum list system-config*  所有安装。

 

参考:http://blog.csdn.net/johnstrive/article/details/5625121

相关文章
相关标签/搜索