Forrest logo
back to the ip tool

ip-route:tldr:58130

ip-route: Delete a static route.
$ sudo ip route del ${destination_ip} dev ${eth0}
try on your machine

This command is used to delete a specific entry from the routing table on a Linux system. Here's an explanation of the different parts of the command:

  • sudo: This command is used to execute the following instruction with administrative privileges. It requests the user to enter the password for authentication.

  • ip route del: This is the main part of the command. It is used to delete a specific route from the routing table.

  • ${destination_ip}: This variable should be replaced with the actual destination IP address you want to remove from the routing table. For example, you might replace it with "192.168.1.100" if you want to delete a route to that specific IP address.

  • dev ${eth0}: Another variable in the command. In this case, ${eth0} should be replaced with the actual name of the network interface (e.g., eth0, eth1) you want to delete the route from. This specifies the outgoing interface for the specific destination IP.

Overall, this command allows the user to delete a specific route from the routing table that matches the destination IP and outgoing interface specified.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ip tool