How to Fix bash route command not found in Minimal Linux

The route command has historically served as the standard command-line utility for viewing, adding, and modifying IP routing tables in Linux operating systems. However, in modern minimal server distributions, cloud instances (AWS EC2, Google Cloud Engine), and minimal container images (Docker, Podman), attempting to execute the command results in the error: bash: route: command not found. Because legacy networking utilities have been deprecated in favour of the modern iproute2 suite, the command is omitted from standard base installations.

Use Modern ip route Commands (No Installation Required)

Modern Linux operating systems integrate the iproute2 suite by default, providing faster, more robust routing table controls without installing packages:

  1. To display the current kernel routing table:
    ip route show
  2. To inspect the default gateway route:
    ip route | grep default
  3. To add a static route to a target subnet:
    sudo ip route add 10.0.0.0/24 via 192.168.1.1 dev eth0
  4. To delete a specific routing table entry:
    sudo ip route del 10.0.0.0/24 dev eth0

Install net-tools on Debian, Ubuntu, and Linux Mint

If legacy automation scripts or third-party administration software require the traditional route binary:

  1. Update your local package index:
    sudo apt update
  2. Install the net-tools package:
    sudo apt install -y net-tools
  3. Verify that the command is now accessible:
    route -n

Install net-tools on RHEL, CentOS, Rocky Linux, and Fedora

On Red Hat enterprise distributions, the utility is provided via DNF and YUM:

  1. On Fedora, Rocky Linux, AlmaLinux, or RHEL:
    sudo dnf install -y net-tools
  2. On legacy CentOS 7 servers:
    sudo yum install -y net-tools
  3. Confirm binary path:
    which route

Install net-tools in Minimal Alpine Linux Containers

Alpine Linux containers provide the tool through APK:

  1. Update the package index:
    apk update
  2. Install net-tools:
    apk add net-tools
  3. In automated Dockerfiles, add the package to support legacy routing routines:
    RUN apk add --no-cache net-tools

Adopting modern ip route syntax or installing the net-tools package eliminates the “route command not found” error across minimal Linux systems.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.