Debian Bookworm (Standard Install) Ifconfig Problem

Soldato
Joined
24 Mar 2018
Posts
2,992
Location
Brighton
I've have to admit I have never just picked up a copy of Debian from their site before. Other flavours yes. On install of new Flavours @ the cli I have a set of stuff IE essentials I like to install. Like: dnstop,iftop,iperf3,mtr etc.. you get idea but! ifconfig which I would get from net-tools doesn't want to work this time. I know I could do ip a, but I like what I like. Anyway all I seem to get from it now is -bash: ifconfig: command not found. I used sudo apt install by the way. Any thoughts welcome.
 
Last edited:
Check whether ifconfig actually exists on your filesystem - look in /usr/bin/, /bin, /sbin, /usr/sbin, /usr/local/bin, /usr/local/sbin

If it's there, check the location is in your path?
 
I've have to admit I have never just picked up a copy of Debian from their site before. Other flavours yes. On install of new Flavours @ the cli I have a set of stuff IE essentials I like to install. Like: dnstop,iftop,iperf3,mtr etc.. you get idea but! ifconfig which I would get from net-tools doesn't want to work this time. I know I could do ip a, but I like what I like. Anyway all I seem to get from it now is -bash: ifconfig: command not found. I used sudo apt install by the way. Any thoughts welcome.
When you say net-tools doesn't want to work, what do you mean? I am running Bookworm and just tried it - sudo apt install net-tools - I could then run ifconfig without a problem. Did you try run sudo apt update?

ifconfig is actually deprecated now, so you really should move over to ip!
 
Last edited:
and yes you was correct I just needed to run sudo apt update lol
Strike that I was at a pi console, so I would need to add paths or just use sudo is the best answer
 
Last edited:
It works using sudo ifconfig. if I use pi's or ubuntu I would just need to use ifconfig.
Yeah makes no sense that you need elevated privileges to see a host's IP address.

Root issue is your path should have sbin in it anyway as far as I'm concerned.

Alternatively you could just run /sbin/ifconfig from the standard user prompt (or /usr/sbin/ifconfig if that's where it is)
 
Last edited:
which ifconfig
/sbin/ifconfig -version
net-tools 2.10
which ifconfig
/usr/sbin/ifconfig

Edit: Which isn't part of the debian package so it just returned nothing.
On installing which I get this output...
which: no ifconfig in (/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games)
 
Last edited:
This has been expected behaviour in Debian for a long time now, as it's deprecated. You can either specify full path, or alias ifconfig to resolve the full path for you.
 
This has been expected behaviour in Debian for a long time now, as it's deprecated. You can either specify full path, or alias ifconfig to resolve the full path for you.
Yeah I can't stand the way ip adress looks, half arsed etc.
So I've just chucked export PATH="/usr/sbin:$PATH" in my profile for now!
 
Back
Top Bottom