ifconfig: command not found

查看path配置(echo相当于c中的printf,C#中的Console.WriteLine)

1
echo $PATH

解决方案1:先看看是不是root用户,如果不是就 su 切换到root用户

su

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

这个一般都是因为配置没弄好,永久解决:

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

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

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

说明ifconfig真的换了,淡定

看看信息

1
ip addr

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

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

1
cd /etc/sysconfig/network-scripts

用vi打开 ifcfg-eth0 (你的可能是eth1,或者其他,不是每个电脑都是这个的)【如果想改成这个可以参考:http://jingyan.baidu.com/article/7f41ecec1b022e593d095c1e.html

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

重启一下

1
reboot

用root用户登陆后 输入

1
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*  全部安装。

ifconfig: command not found(CentOS 7,其他的可以参考)的更多相关文章

  1. ifconfig: command not found(CentOS专版,其他的可以参考)

    ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) echo $PATH 解决方案1:先看看是不是 ...

  2. Linux系统ifconfig命令找不到,centos ifconfig Command not found

    centos ifconfig Command not found,Linux系统ifconfig命令找不到 >>>>>>>>>>>& ...

  3. CentOS 7.0下解决ifconfig: command not found的方法

    在CentOS7.0中输入ifconfig命令会遇到-bash: ifconfig: command not found. 在CentOS最小安装时是没有附带ifconfig,我们进入sbin目录下可 ...

  4. CentOS 7.6 最小安装 ifconfig command not found 及 yum 不可用的解决办法

    问题描述 下载的是 CentOS 7.6 Everything 版本,在 VMware 12 上安装时软件选择“最小安装”后,输入 ifconfig 命令提示: bash ifconfig comma ...

  5. CentOS 7 ifconfig: command not found

    # ifcon-bash: ifconfig: command not found谷歌了一下,整理了一下解决思路 查看ifconfig命令是否存在 查看 /sbin/ifconfig是否存在 如果if ...

  6. ifconfig: command not found 如何解决?

    ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) 1 echo $PATH 解决方案1:先看看是 ...

  7. ifconfig出现bash: ifconfig:command not found解决办法之解决连环问题

    Centos7中没有安装ifconfig命令的解决方法 在这之前,centos7最小化安装默认是不能联网的,首先必须切换到root用户,再解决网络问题 一.      切换到root用户 二.     ...

  8. CentOS7 下ifconfig command not found解决办法

    今天尝鲜用VMWare安装了CentOS7,选择了最小安装包模式,安装完毕之后想查看一下本机的ip地址,发现报错 # ifcon -bash: ifconfig: command not found ...

  9. bash: ifconfig: command not found解决方法

    1.问题: #ifconfig bash: ifconfig: command not found 2.原因:非root用户的path中没有/sbin/ifconfig ,其它的命令也可以出现这种情况 ...

随机推荐

  1. Shell 流程控制-if 语句

    单分支if条件语句 if [ 条件判断式 ] ; then程序fi 例子:判断分区使用率 #!/bin/bash # Author: huangrui (Email:mycheryhr@gmail.c ...

  2. HNOI2019

    省选总结 day0 写了下平时不经常写的模板,像什么\(LCT\),圆方树,\(exlucas\)之类的,但是一个都没考. day1 提前十几分钟进了考场,可以提前动电脑,赶紧把\(vimrc\)打了 ...

  3. Python面试指南

    1.Python基本语法 1.@staticmethod 和 @classmethod Python中有三种方法,实例方法.类方法(@classmethod).静态方法(@staticmethod). ...

  4. 使用Docker Swarm搭建分布式爬虫集群

    https://mp.weixin.qq.com/s?__biz=MzIxMjE5MTE1Nw==&mid=2653195618&idx=2&sn=b7e992da6bd1b2 ...

  5. Spring Boot实战

    Spring在java EE开发中是实际意义上的标准,但我们在开发Spring的时候可能会遇到以下令人头疼的问题: 1.大量配置文件的定义.2.与第三方软件整合的技术问题. Spring每个版本的退出 ...

  6. js小结

    1,浏览器对json支持的方法: JSON.parse(jsonstr);将string转为json的对象. JSON.stringify(jsonobj);将json对象转为string. 2,js ...

  7. Django(十四)分页器(paginator)及自定义分页D

    http://www.mamicode.com/info-detail-1724597.html http://www.cnblogs.com/wupeiqi/articles/5246483.htm ...

  8. 第三十八篇-logcat的使用

    很多時候,程序有问题时都需要debug,一般会设置几个信息点,查看程序是否运行,之前学过Toast,可以广播,但是终归是不太方便,今天学习一下logcat的用法. logcat里面是一些日志,内容太多 ...

  9. 使用WinForm Chart控件 制作饼装,柱状,折线图

    http://blog.csdn.net/dream2050csdn/article/details/53510340 chart控件的属性很多,主要用到Chart控件图表区域的属性有五个属性 1.A ...

  10. R语言:提取路径中的文件名字符串(basename函数)

    假设存在路径C:/coverage/Homo_sapiens.sort.add_exon1_coverage.txt,欲提取Homo_sapiens.sort.add_exon1_coverage.t ...