In this article, we will find the reason and solution for the error “bash ifconfig: command not found “.
Reason:
It is part of the package net-tools, which is not installed by default, because it’s deprecated and superseded by the command ip from the package iproute2 in new versions of Linux distro’s.
Solutions:
1. Use ip addr show
or
2. Install net-tools using below command.
On Redhat/CentOS/Fedora distributions, run the below command.
sudo yum install net-tools
On Ubunut/Debain/Kali Linux distributions, run the below command.
sudo apt-get install net-tools
Then, run the ifconfig on your terminal.
/usr/sbin/ifconfig