How to Install ifconfig on Debian

Install ifconfig on Debian 11, 12, or 13 with apt install net-tools, fix ifconfig command not found on minimal images, compare with ip from iproute2, verify interfaces, and uninstall net-tools cleanly.

Published

Updated

Read time 5 min read

Reviewed byDeepak Prasad

How to Install ifconfig on Debian

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. 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.

Tested on: Debian 13 (trixie); kernel 6.12.94+deb13-amd64; amd64; net-tools 2.10-1.3.

NOTE
Debian does not ship a package named 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

bash
. /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 -8

When net-tools is missing, you typically see:

text
ifconfig: not in PATH

or, if /usr/sbin is on PATH but the binary is absent:

text
bash: ifconfig: command not found

On the test host (net-tools already present):

text
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.3

There 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.
  • iproute2 is usually already installed for basic networking.

Install ifconfig with net-tools

Install the NET-3 networking toolkit (linuxconfig.org, Linux Handbook):

bash
sudo apt update
sudo apt install -y net-tools
text
Reading 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:

bash
ifconfig --version
which ifconfig
dpkg -S "$(which ifconfig)"
text
net-tools 2.10
/usr/sbin/ifconfig
net-tools: /usr/sbin/ifconfig

Show all interfaces:

bash
ifconfig -a | head -20
text
enp0s3: 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.0

Other binaries in net-tools

Installing net-tools also provides legacy tools many admins still expect:

text
/usr/sbin/ifconfig
/usr/sbin/route
/usr/sbin/netstat
/usr/sbin/arp

(Exact file list: dpkg -L net-tools | grep '^/usr/sbin/'.)


iproute2 is the modern replacement. It is usually installed without net-tools:

bash
ip -br addr show
ip addr show dev enp0s3 2>/dev/null | head -6
text
lo               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 Linux ip command 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:

bash
ls -l /usr/sbin/ifconfig
sudo ifconfig -a | head -5

Add /usr/sbin for your user if needed:

bash
echo 'export PATH="/usr/sbin:$PATH"' >> ~/.profile

Read the manual

bash
MANPAGER=cat man ifconfig 2>/dev/null | head -6
text
IFCONFIG(8)           Linux System Administrator's Manual           IFCONFIG(8)

NAME
       ifconfig - configure a network interface

SYNOPSIS

Update net-tools

bash
sudo apt update
sudo apt install --only-upgrade net-tools
ifconfig --version

Check installed version with list installed packages on Debian:

bash
dpkg -l net-tools | grep ^ii

Uninstall ifconfig (remove net-tools)

Removing net-tools removes ifconfig and related binaries together:

bash
sudo apt remove net-tools

Dry-run on the test host:

text
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


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.


Frequently Asked Questions

1. How do I install ifconfig on Debian?

Run sudo apt update && sudo apt install -y net-tools. ifconfig is provided by the net-tools package at /usr/sbin/ifconfig—not a separate ifconfig package.

2. Why is ifconfig command not found on Debian?

Minimal and many server installs omit net-tools because ip from iproute2 replaced ifconfig years ago. Install net-tools when you need ifconfig, or use ip addr show instead.

3. What package contains ifconfig on Debian?

net-tools (NET-3 networking toolkit). Confirm with dpkg -S /usr/sbin/ifconfig after install.

4. Should I use ifconfig or ip on Debian?

ip from iproute2 is the modern default and is usually pre-installed. ifconfig from net-tools is fine for legacy scripts and tutorials—install net-tools only when you need it.

5. Is net-tools installed by default on Debian?

Not on every image. Full desktop installs may include it; minimal netinst and cloud images often do not. Run command -v ifconfig to check.

6. How do I list IP addresses without ifconfig?

Use ip -br addr show for a short view or ip addr show for detail. See the Linux ip command guide for more examples.

7. ifconfig is in /usr/sbin but still not found—why?

/usr/sbin may be off PATH for non-root users on Debian. Use sudo ifconfig or /usr/sbin/ifconfig, or add /usr/sbin to PATH in your shell profile.

8. How do I remove ifconfig from Debian?

sudo apt remove net-tools removes ifconfig, route, netstat, and other net-tools binaries together.
Omer Cakmak

Linux Administrator

Highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on …