bash: ifconfig: command not found

场景描述:在Kali操作系统中查看ip地址,使用ifconfig命令查看则会报错误

bash: ifconfig: command not found

如下截图:

Kali的版本为:2020.3

需要使用$sudo ifconfig 就可以显示kali的ip地址。

zhj@kali001:~$ sudo ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.27  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::20c:29ff:fe24:eace  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:24:ea:ce  txqueuelen 1000  (Ethernet)
        RX packets 1137  bytes 328025 (320.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 137  bytes 10694 (10.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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 12  bytes 556 (556.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 556 (556.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

如果还是显示“bash: ifconfig: command not found”,则说明未安装net-tools,需要安装一下net-tools

zhj@kali001:~$ sudo apt-get install net-tools
[sudo] password for zhj: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  net-tools
1 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
Need to get 250 kB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Get:1 http://mirrors.neusoft.edu.cn/kali kali-rolling/main amd64 net-tools amd64 1.60+git20181103.0eebece-1 [250 kB]
Fetched 250 kB in 3s (84.1 kB/s)  
(Reading database ... 262982 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20181103.0eebece-1_amd64.deb ...
Unpacking net-tools (1.60+git20181103.0eebece-1) over (1.60+git20180626.aebd88e-1) ...
Setting up net-tools (1.60+git20181103.0eebece-1) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for kali-menu (2020.3.2) ...

 

 收藏 (0) 打赏

您可以选择一种方式赞助本站

支付宝扫一扫赞助

微信钱包扫描赞助

未经允许不得转载:番茄网 » bash: ifconfig: command not found

分享到: 生成海报

评论 抢沙发

  • QQ号
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

像番茄一样 表里如一

表里如一表里如一
切换注册

登录

忘记密码 ?

切换登录

注册

我们将发送一封验证邮件至你的邮箱, 请正确填写以完成账号注册和激活