演示环境 $ uname -a Linux xxxxx-xxxxx-xxxx5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux 1.关于 重装完系统,发现没有命令ifconfig $ ifconfig zsh: command not found: ifconfig 2.检查是否存在该命令 自己使用了ohmyzsh,检查配置文件的PATH中是否包含sbin目录,还需要…
1.问题: #ifconfig bash: ifconfig: command not found 2.原因:非root用户的path中没有/sbin/ifconfig ,其它的命令也可以出现这种情况,解决的方法是一样的. # whereis ifconfig #ifconfig位置 ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig..gz # echo $PATH /usr/kerberos/sbin:/usr/kerberos/bin…
ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) echo $PATH 解决方案1:先看看是不是root用户,如果不是就 su 切换到root用户 su 解决方案2:(如果没看见 /sbin)[我们这显然不是这个问题] 这个一般都是因为配置没弄好,永久解决: 打开/etc/profile文件,在其中输入export PATH=$PATH:/sbin 解决方案3:(CentOS后来换指令了,看看…
今天尝鲜用VMWare安装了CentOS7,选择了最小安装包模式,安装完毕之后想查看一下本机的ip地址,发现报错 # ifcon -bash: ifconfig: command not found 谷歌了一下,整理了一下解决思路 1. 查看ifconfig命令是否存在 查看 /sbin/ifconfig是否存在 2.如果ifconfig命令存在,查看环境变量设置 #echo $PATH 如果环境变量中没有包含ifconfig命令的路径 临时修改环境变量:在shell中输入 $export PA…
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后来换指令了,…
centos ifconfig Command not found,Linux系统ifconfig命令找不到 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>. 蕃薯耀 2016年6月1日 14:50:28 星期三 http://fanshuyao.iteye.com/…
在CentOS7.0中输入ifconfig命令会遇到-bash: ifconfig: command not found. 在CentOS最小安装时是没有附带ifconfig,我们进入sbin目录下可以查看到ifconfig命令是没有安装的 因此这个时候我们只要安装net-tool插件,此插件中带有ipconfig命令 yum install -y net-tools 安装完成后,可以直接使用ifconfig命令了…
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后来换指令了,…
[root@localhost ~]# ifconfig -bash: ifconfig: command not found 输入ip addr 确认IP地址是否设置正常,设置好如下所示,如果没有获取到IP地址则设置一个即可. 确认ifconfig命令是否未安装 ls /sbin|grep ifconfig 安装net-tool插件,此插件中带有此命令 sudo yum install net-tools 等待安装完成,再次输入ifconfig,成功.…
同事扔过来一个rhel7.2的系统,登录后发现没有安装ifconfig命令: # ifconfig -bash: ifconfig: command not found 先看看环境变量: # echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin 在查看ifconfig命令是否存在:结果没有发现命令 # ls /sbin/ifconfig 安装ifconfig命令: # yum upgrade # yum in…