ubuntu无法找到ifconfig(command not found: ifconfig)
演示环境
$ 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
目录,还需要检查sbin
目录下是否存在ifconfig
命令。
3.安装
- 3.1 安装命令
$ sudo apt-get install ifconfig
失败,提示找不到该包
$ sudo apt-get install ifconfig
[sudo] password for cube:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ifconfig
*3.2 正确安装指令
ifconfig
包含在net-tools
中,该库还包含其他命令:whois
sudo apt-get install net-tools
安装结果
$ sudo apt-get install net-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
net-tools
0 upgraded, 1 newly installed, 0 to remove and 104 not upgraded.
Need to get 196 kB of archives.
After this operation, 864 kB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/ubuntu focal/main amd64 net-tools amd64 1.60+git20180626.aebd88e-1ubuntu1 [196 kB]
Fetched 196 kB in 12s (16.6 kB/s)
Selecting previously unselected package net-tools.
(Reading database ... 166990 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20180626.aebd88e-1ubuntu1_amd64.deb ...
Unpacking net-tools (1.60+git20180626.aebd88e-1ubuntu1) ...
Setting up net-tools (1.60+git20180626.aebd88e-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
4.使用ifconfig
$ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 151 bytes 13005 (13.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 151 bytes 13005 (13.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 00
ubuntu无法找到ifconfig(command not found: ifconfig)的更多相关文章
- bash: ifconfig: command not found解决方法
1.问题: #ifconfig bash: ifconfig: command not found 2.原因:非root用户的path中没有/sbin/ifconfig ,其它的命令也可以出现这种情况 ...
- ifconfig: command not found(CentOS专版,其他的可以参考)
ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) echo $PATH 解决方案1:先看看是不是 ...
- CentOS7 下ifconfig command not found解决办法
今天尝鲜用VMWare安装了CentOS7,选择了最小安装包模式,安装完毕之后想查看一下本机的ip地址,发现报错 # ifcon -bash: ifconfig: command not found ...
- ifconfig: command not found 如何解决?
ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) 1 echo $PATH 解决方案1:先看看是 ...
- Linux系统ifconfig命令找不到,centos ifconfig Command not found
centos ifconfig Command not found,Linux系统ifconfig命令找不到 >>>>>>>>>>>& ...
- CentOS 7.0下解决ifconfig: command not found的方法
在CentOS7.0中输入ifconfig命令会遇到-bash: ifconfig: command not found. 在CentOS最小安装时是没有附带ifconfig,我们进入sbin目录下可 ...
- ifconfig: command not found(CentOS 7,其他的可以参考)
ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) 1 echo $PATH 解决方案1:先看看是 ...
- centos7 (ifconfig不能使用) -bash: ifconfig: command not found
[root@localhost ~]# ifconfig -bash: ifconfig: command not found 输入ip addr 确认IP地址是否设置正常,设置好如下所示,如果没有获 ...
- rhel7 ifconfig command not found
同事扔过来一个rhel7.2的系统,登录后发现没有安装ifconfig命令: # ifconfig -bash: ifconfig: command not found 先看看环境变量: # echo ...
随机推荐
- Perl语言入门14-17
---------第十四章 字符串与排序------------------- index查找子字符串 my $stuff = "howdy world!"; my $where ...
- Telink BLE MESH PWM波的小结
本本针对Telink BLE MESH SDK 灯控的使用进行说明. 1.调整灯光的频率 默认情况下 SDK PWM波的频率是 600HZ的,有时我们需要将它调整频率,例如调整为4K,只需要更改参数 ...
- C++中的字符串输入getline
http://www.cnblogs.com/wanghao111/archive/2009/09/05/1560822.html 1 #include <iostream> 2 #inc ...
- A Child's History of England.36
CHAPTER 11 ENGLAND UNDER MATILDA AND STEPHEN The King was no sooner dead than all the plans and sche ...
- 【讨论】APP的免填邀请码解决方案
00x0 具体需求 app中已注册的用户分享一个含有邀请码的二维码,分享到朋友圈新用户在朋友圈打开这个这个链接下载app.新用户安装后打开app后就自动绑定邀请码要求用户不填写任何东西 朋友老板出差给 ...
- volatile原理和应用场景
volatile是java语言中的一个关键字,常用于并发编程,有两个重要的特点:具有可见性,java虚拟机实现会为其满足Happens before原则;不具备原子性.用法是修饰变量,如:volati ...
- 一条查询SQL查询语句的执行原理
先熟悉一下浅而易懂SQL执行的流程图SQL查询过程七步曲 1.查询SQL发送请求 客户端将查询sql按照mysql通信协议传输到服务端.服务端接受到请求后,服务端单起一个线程执行sql 2.判断是否为 ...
- JAVA序列化浅析
java.io.Serializable浅析 Java API中java.io.Serializable接口源码: 1 public interface Serializable { 2 } 类通过实 ...
- 编译安装redis之快速增加redis节点
#: 下载安装包 [root@localhost ~]# wget http://download.redis.io/releases/redis-4.0.14.tar.gz #:解压 [root@l ...
- 4、Linux下安装tomcat
Linux系统下安装tomcat 一.安装JDK 安装Tomcat之前需要安装JDk,安装JDk请参考:JDK安装. 二.Linux安装Tomcat 1.官网上下载Tomcat Apach ...