| Tested on | Debian 13 (trixie) |
|---|---|
| Package | net-tools 2.10 |
| Applies to | Debian |
| Privilege | sudo or root |
| Scope | Install ifconfig on Debian, including fix ifconfig command not found on minimal images, compare, verify interfaces, and uninstall net-tools cleanly. |
| Related guides | Add Apt Repository Command Not Found Apt Install Specific Version Backup Brave Browser Session Ubuntu Check Ubuntu Version Configure Vnc Server Ubuntu |
ifconfig configures and displays network interfaces—the classic tool from the net-tools suite. On Debian, it is not its own package: you install net-tools with apt. That bundle also ships netstat and route; see the netstat command for listening-port checks (ss is preferred on newer systems). Minimal images often ship only ip from iproute2, so ifconfig: command not found is normal until you install net-tools or migrate scripts to ip.
This guide covers install ifconfig on Debian for Debian 11 (Bullseye), 12 (Bookworm), and 13 (Trixie): fix command not found, install net-tools, verify addresses, compare with ip command, and uninstall. I ran these steps on Debian 13 and kept real terminal output below.
ifconfig. Searching packages.debian.org for ifconfig points at net-tools. apt install ifconfig will fail.
Choose an approach
| Approach | Best for | On test host |
|---|---|---|
apt install net-tools |
You need ifconfig for scripts, exams, or legacy docs |
ifconfig at /usr/sbin/ifconfig |
ip from iproute2 |
New work, automation, default on minimal Debian | ip -br addr works without net-tools |
| Both | Transition period while updating old scripts | Common on desktop images |
Most new guides should prefer ip. Install net-tools when something explicitly calls ifconfig.
Check whether ifconfig is installed
List files shipped by a package with dpkg -L; the dpkg command shows how to locate binaries and configuration paths.
. /etc/os-release && echo "$PRETTY_NAME"
command -v ifconfig || echo "ifconfig: not in PATH"
dpkg -l net-tools 2>/dev/null | grep ^ii
apt-cache policy net-tools | head -8When net-tools is missing, you typically see:
ifconfig: not in PATHor, if /usr/sbin is on PATH but the binary is absent:
bash: ifconfig: command not foundOn the test host (net-tools already present):
Debian GNU/Linux 13 (trixie)
/usr/sbin/ifconfig
ii net-tools 2.10-1.3 amd64 NET-3 networking toolkit
net-tools:
Installed: 2.10-1.3
Candidate: 2.10-1.3There is no separate ifconfig candidate in apt—only net-tools.
Prerequisites
-
Debian 11, 12, or 13 with network access for
apt. -
sudo for package install.
-
iproute2is usually already installed for basic networking. -
For broader CLI reference beyond the
aptandsudosteps below, see the Linux commands.
Commands below that need root use sudo command.
Install ifconfig with net-tools
Install the NET-3 networking toolkit (linuxconfig.org, Linux Handbook):
sudo apt update
sudo apt install -y net-toolsReading package lists...
net-tools is already the newest version (2.10-1.3).On a minimal system without the package, apt downloads and installs net-tools (~250 KB) and places ifconfig under /usr/sbin/.
Verify:
List every PATH match with which -a; the which command compares which to type -a and command -v.
ifconfig --version
which ifconfig
dpkg -S "$(which ifconfig)"net-tools 2.10
/usr/sbin/ifconfig
net-tools: /usr/sbin/ifconfigShow all interfaces:
ifconfig -a | head -20enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
...
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0Other binaries in net-tools
Installing net-tools also provides legacy tools many admins still expect:
/usr/sbin/ifconfig
/usr/sbin/route
/usr/sbin/netstat
/usr/sbin/arp(Exact file list: dpkg -L net-tools | grep '^/usr/sbin/'.)
Use ip instead of ifconfig (recommended for new scripts)
iproute2 is the modern replacement. It is usually installed without net-tools:
ip -br addr show
ip addr show dev enp0s3 2>/dev/null | head -6lo UNKNOWN 127.0.0.1/8 ::1/128
enp0s3 UP 10.0.2.15/24 fd17:625c:f037:2:.../64 fe80::a00:27ff:fe15:1305/64
docker0 DOWN 172.17.0.1/16| Task | ifconfig | ip (iproute2) |
|---|---|---|
| List addresses | ifconfig -a |
ip -br addr or ip addr |
| Bring interface up | ifconfig eth0 up |
ip link set eth0 up |
| Assign IPv4 | ifconfig eth0 192.168.1.10/24 |
ip addr add 192.168.1.10/24 dev eth0 |
See the ip guide for routing (ip route) and link management.
PATH and /usr/sbin
ifconfig lives in /usr/sbin, which Debian may omit from a normal user’s PATH. If command -v ifconfig is empty but the package is installed:
ls -l /usr/sbin/ifconfig
sudo ifconfig -a | head -5Add /usr/sbin for your user if needed:
echo 'export PATH="/usr/sbin:$PATH"' >> ~/.profileRead the manual
MANPAGER=cat man ifconfig 2>/dev/null | head -6IFCONFIG(8) Linux System Administrator's Manual IFCONFIG(8)
NAME
ifconfig - configure a network interface
SYNOPSISUpdate net-tools
sudo apt update
sudo apt install --only-upgrade net-tools
ifconfig --versionCheck installed version with list installed packages on Debian:
dpkg -l net-tools | grep ^iiUninstall ifconfig (remove net-tools)
Removing net-tools removes ifconfig and related binaries together:
sudo apt remove net-toolsDry-run on the test host:
REMOVING:
net-tools
Remv net-tools [2.10-1.3]Use ip afterward for interface listing. Old scripts that call ifconfig will break until you reinstall net-tools or rewrite them.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
ifconfig: command not found |
net-tools not installed | sudo apt install net-tools |
Unable to locate package ifconfig |
No such package name | Install net-tools, not ifconfig |
| Installed but not in PATH | /usr/sbin excluded |
sudo ifconfig or fix PATH |
ifconfig vs ip output differs |
Different tool semantics | Prefer ip for new config; see ip command |
| Works as root, not as user | sbin PATH / permissions | sudo ifconfig or add /usr/sbin to PATH |
| Still missing after install | Wrong architecture / broken dpkg | dpkg -l net-tools; sudo apt install -f |
References
- packages.debian.org — search ifconfig (contents)
- Linux Handbook — ifconfig on Debian
- linuxconfig.org — install missing ifconfig
- Stack Overflow — ifconfig command not found
- Linux ip command, , , , ,
Summary
Install ifconfig on Debian with sudo apt install net-tools—there is no separate ifconfig package. Fix command not found on minimal images by installing net-tools or switch scripts to ip addr from iproute2. Verify with ifconfig --version and dpkg -S /usr/sbin/ifconfig, and remove net-tools when you no longer need legacy NET-3 tools.

