Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ifconfig not avaliable with net-tools in Debian [SOLVED]
#1
I decided to try out Debian 10 today on one of my machines. I wanted to put a static IP on it in case I ever want to ssh into it. One of the things I am used to using is the ifconfig command. I installed the net-tools package and typed ifconfig into the terminal, but it still dosen't work. After a reboot it still didn't work. I tried using the which command to make sure it was installed:
Code:
$ which net-tools
$

I tried installing it again:

Code:
$ sudo apt install net-tools
[sudo] password for jeremiah:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
net-tools is already the newest version (1.60+git20180626.aebd88e-1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
$

I tried re-installing it, but still ifconfig won't work:

Code:
$ ifconfig
bash: ifconfig: command not found
$


What is going on? Do I need to install another package? I looked around on my own, but everything that I have found just tells me to install net-tools and it should work.

This is Debian 10 with the XFCE Desktop, if that makes any difference.
Just a teen who LOVES working with computers
Reply
#2
Knowing debian, it might be in '/sbin/' instead of '/bin/'. Try using it with sudo and see if that works.


Also 'ifconfig' is deprecated and being phased out. You can use the newer 'ip' command instead. It has a different syntax but should allow you to do anything you would want to do with 'ifconfig'. To see the current IP adresses of all connected network hardware you can use 'ip addr'.
My website - My git repos

"Things are only impossible until they’re not." - Captain Jean-Luc Picard
Reply
#3
I would have never thought to do sudo ifconfig. Thank you!

As for ifconfig being deprecated for the ip command, I knew about that. I just would rather use ifconfig. I am more used to the ifconfig command and where to find things in it.
Just a teen who LOVES working with computers
Reply
#4
(08-11-2019, 03:58 PM)Jeremiah Wrote: I would have never thought to do sudo ifconfig. Thank you!

That is typical for Debian. '/sbin/' is basically for administrator tools while '/bin/' is for all other programs. In most distributions, both are symlinks pointing to the exact same directory. Debian however is still designed to work as a system with multiple active users, so they keep the more traditional separation that comes from the early ages of Linux. '/sbin/' is simply not in the $PATH of a normal user, but since 'sudo' lets you execute commands as root, you also get roots $PATH. Other commands that won't work without sudo on Debian include 'poweroff' and 'reboot'.
My website - My git repos

"Things are only impossible until they’re not." - Captain Jean-Luc Picard
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)