Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Linux reports ifconfig: command not found, either the legacy net-tools package is not installed or your shell cannot find its executable because its directory is missing from PATH. Check both possibilities first. If you only need to inspect network interfaces, you may not need to install anything: the modern ip command is the recommended alternative on Debian and covers common address, link, route, and neighbor checks.

Check whether ifconfig is missing or just outside your PATH

Run these commands in the same shell that showed the error:

command -v ifconfig
type -a ifconfig

If either command prints a path, the shell can find ifconfig. If neither prints a path, check the common administrative directories directly:

/sbin/ifconfig
/usr/sbin/ifconfig

If one of those runs, the executable exists and the likely problem is that its directory is absent from your PATH. If both return “No such file or directory,” the command is probably not installed. A package manager installs net-tools, not a package named ifconfig.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the executable exists but PATH omits its directory

For a temporary fix in the current shell, add the directories to the end of the existing path:

export PATH="$PATH:/usr/sbin:/sbin"
command -v ifconfig

This change lasts only for that shell session. If it resolves the issue, inspect your shell startup configuration and your distribution’s environment setup before making it permanent. Do not replace the whole PATH with a short custom value: doing so can make other commands unavailable. If the command was installed moments ago, open a new terminal or refresh the shell’s command lookup with hash -r, then check again.

Install net-tools on your distribution

If neither administrative path contains the executable, install the package for your distribution. Use the command for the distribution family you are actually running; package names and available versions can vary by release.

Distribution family Install command Notes
Debian, Ubuntu, Linux Mint, Pop!_OS, Raspberry Pi OS sudo apt update && sudo apt install net-tools Refreshes package metadata before installing the legacy tools.
Fedora, RHEL, CentOS, Rocky Linux, AlmaLinux sudo dnf install net-tools Older CentOS releases may use sudo yum install net-tools.
Arch Linux, Manjaro sudo pacman -S net-tools Confirm the package transaction before it proceeds.
Alpine Linux sudo apk add net-tools Uses Alpine’s apk package manager.
openSUSE sudo zypper install net-tools-deprecated Verify the package name for your exact openSUSE release before running this command.

After installation, verify that your shell can resolve the command and that it can display interfaces:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
command -v ifconfig
ifconfig -a

The -a option includes interfaces that are down as well as active ones. With no arguments, ifconfig displays active interfaces; with an interface argument, it can configure that interface. Those behaviors are described in the Debian ifconfig(8) manual.

Use iproute2 instead when you do not need legacy syntax

Installing net-tools is optional if your task is simply to inspect or manage ordinary Linux networking. Debian’s reference recommends the iproute2 programs for low-level network configuration and maps traditional commands such as ifconfig, route, and arp to the newer ip command’s address, route, and neighbor functions. The ip utility is commonly available on current Linux installations; if it is missing, install the distribution’s iproute2 package using its package manager.

Task Modern command What to look for
Show interface addresses, including down interfaces ip addr Interface names, state, IPv4 and IPv6 addresses, and prefix lengths.
Show a compact address summary ip -br addr A brief row per interface, useful for a quick overview.
Show one interface’s addresses ip addr show dev INTERFACE Replace INTERFACE with a real name, such as eth0 or enp1s0.
Show links and hardware-layer details ip link Link state and link-layer information, including the hardware address.
Show packet counters ip -s link Receive and transmit statistics for links.
Show the routing table ip route Routes, including the default route when one is configured.
Show the neighbor cache (the modern counterpart to common ARP-cache checks) ip neigh Neighbor entries and their states.

For changes, use the corresponding ip subcommands with care. For example, these commands change link state or add an address:

sudo ip link set dev INTERFACE up
sudo ip link set dev INTERFACE down
sudo ip addr add ADDRESS/PREFIX dev INTERFACE

Substitute a real interface and an address with its prefix length; do not paste the example placeholders literally. These are configuration changes, unlike the inspection commands above, and may interrupt connectivity or fail without the required privileges. An address added this way is not necessarily a persistent system configuration: persistence is managed by the network configuration system used by your distribution.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For link-layer details specifically, the Ubuntu ifconfig(8) manual says, “Please use ip link command from iproute2 package to display link layer informations including the hardware address.” This makes ip link a direct choice for that inspection task, even if you keep ifconfig installed for old scripts or tutorials.

Choose between restoring ifconfig and switching to ip

Both approaches can be reasonable. Restore ifconfig when a script or established procedure explicitly depends on its syntax, or when you need to follow a legacy tutorial exactly. Prefer ip for new instructions and routine Linux network inspection: it is the tool family recommended by Debian’s reference for low-level configuration, and it covers the everyday address, link, route, and neighbor tasks without requiring the legacy package.

  • Distribution availability: ifconfig is supplied by net-tools; it may not be installed by default. The relevant package manager and package name vary across distributions.
  • Inspection versus configuration: For read-only checks, commands such as ip -br addr and ip route avoid changing network state. Either tool can make changes, but configuration commands need more care and commonly require administrative privileges.
  • Modern workflows: Debian’s documentation favors iproute2 for low-level network configuration. Older commands may still be appropriate when maintaining existing scripts or matching legacy syntax.
  • Privileges: You generally do not need sudo merely to display addresses or routes. Changes to interface state or addresses may require it; use elevated privileges only for the change you intend to make.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot installation and lookup failures

The package manager says it cannot find net-tools

First confirm the distribution and release rather than trying a package command for another Linux family. On Debian-family systems, run sudo apt update before installing. On openSUSE, the listed package name is net-tools-deprecated; check that name against the release’s repositories and documentation. Minimal, container, or custom images may use different repositories or omit package metadata, so resolve repository access and release configuration before repeating the install.

The install succeeds, but the shell still says command not found

Check command -v ifconfig, then test /sbin/ifconfig and /usr/sbin/ifconfig. If a direct path works, fix the current shell’s PATH as shown above. If neither path works, check whether the package installation actually completed and whether it was performed inside the same system environment where you are running the command. A host installation does not add commands to a separate container or other isolated environment.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You see “Permission denied” instead of “command not found”

This is a different failure: the shell found a file but could not execute it. Check that you are invoking the executable rather than a directory and that you are using the intended path. Do not use sudo as a blanket fix for lookup problems. If you are trying to change network settings, use the appropriate administrative privileges for that specific operation.

The command works, but an interface is missing

By default, ifconfig displays active interfaces only. Run ifconfig -a to include down interfaces, or use ip link and ip addr to inspect links and addresses. An interface that is absent from those results is not made available simply by reinstalling net-tools; investigate the system’s network devices and configuration separately.

A tutorial’s output or interface name differs from yours

Interface names are not guaranteed to match examples such as eth0. Get the names on your own system from ip link or ip -br addr, then substitute the actual name in commands such as ip addr show dev INTERFACE. Likewise, address and route output depends on the machine’s current network configuration, so an example’s values are not expected to match yours.

Or skip the browser setup

This Linux networking fix does not require a browser or a screenshot service. Separately, if your development work needs website screenshots, ScreenshotNeo is a website screenshot API and MCP server for developers; it is not a replacement for ifconfig or ip. One GET request can return a screenshot or PDF:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners, popups, and chat widgets are removed before capture; bot checks, blank pages, failed loads, and cache hits are not billed. An MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.

Sources and scope

The command mapping and recommendation to use iproute2 are from the Debian Reference. The package attribution and link-layer guidance are from the Ubuntu ifconfig(8) manual; command behavior is described in the Debian ifconfig(8) manual. Package availability and exact package names can differ by distribution release, especially where the openSUSE package is concerned.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.