Solve Kali Linux error – bash: ifconfig: command not found

- Advertisment -
- Advertisement -

Kali Linux is one of the most popular distros to learn and perform ethical hacking and penetration testing tasks. However, if you have recently installed Kali on your computer or Virtual Machine then you definitely want to see your IP address of the computer via command-line tool. However, as you use the command ifconfig you may see an error “bash: ifconfig: command not found“. So, to solve this generally, we start installing net-tools but that will also give an error “Unable to locate package net-tools“. Henceforth, what to do now? Don’t worry, go through the steps given in this tutorial and you will be good to go.

bash ifconfig- command not found-min

Step 1: Switch to Apt directory of Kali Linux

On the Command terminal type;

cd /etc/apt/

Step 2: Edit Sources.list

Now, what we have to do is to access and edit the sources.list file of Kali Linux where it saved its all system or official repositories. Use the nano command:

sudo nano sources.list

Step 3: Add official Kali repository

Copy-paste the below given official repositories. First one is the standard one while the second if you want to install source packages. However, only the first one will be enough.

deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib

After adding use CTRL+X, type Y and hit the Enter button.

Add official Kali repository-min

Step 4: Run system update command

To reflect the changes in the system and flush cache run the update command:

sudo apt update

Step 5: Install net-tools on Kali

Use the below command to get the network tools on your Linux, so that later we can use the ifconfig command.

sudo apt install net-tools

Install net tools on kali Linux-min

Step 6: Use ifconfig command to check Ip address on Kali Linux

Finally, you can check the Ip address without any error:

ifconfig

check ipaddress on Kali Linux-min

Rajkumar Mauryahttps://www.how2shout.com
Rajkumar Maurya is the H2S Media tech expert. He’s always been passionate about technology and has been writing on the subject since 2014. He has extensive knowledge of all kinds of technology, from consumer-tech to enterprise solutions. You can contact the author at-- raj@how2shout.com

1 COMMENT

  1. Hi Raj, I read your article “Solve Kali Linux error – bash: ifconfig: command not found”.
    It is not a mistake: for many years now net-tools and ifconfig are considered obsolete.

    “The modern replacement is iproute2, which is actively developed and, unlike net-tools,
    has support for all of the kernel networking stack’s fancier features.
    In theory, we all should have transitioned over to iproute2 at least ten years ago.”

    https://lwn.net/Articles/710533/

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Posts

Experts Guide On- How to play Sniper in DOTA 2 like a Pro

Gameplay Kardel Sharpeye or Sniper is a very long-ranged carry type character in DOTA 2. Sniper is designed is a...

What are bottlenecks? Some ways to get rid of PC bottlenecks

It is quite normal to get frustrated when we invest in something but don’t get the expected output in...

How to see different time zones on your Windows 10 and Android

One of the most fundamental thing in this universe is time. Even in our daily lives, we...

AVerMedia launches EA713-AAMN PC box with NVIDIA Jetson AGX

AVerMedia which has been providing NVIDIA Jetson solutions since 2018 recently announced a new product to boost the various...
- Advertisement -

Secureye introduces Falcon iCam 500 Night Vision Camera for homes

Security and surveillance product and solution provider- Secureye, recently has announced its new product in India to secure homes....

Array Networks announces its first ‘Make in India’ product- Amplifier

News Highlights: Amplifier, the first product to be designed and developed in India, tests the load capacity for advanced...

- Advertisment -
- Advertisement -

You might also likeRELATED
Recommended to you