How To Delete Route In Ubuntu Linux? – POFTUT

How To Delete Route In Ubuntu Linux?

I have some route in my routing table. But I want to delete one route from routing table. How can accomplish this?

List Existing Routes

To get detailed information about route that will be removed we list the existing routes in our system.

Remove Specific Route

This command can be run all modern Linux distributions like Kali, Debian, Ubuntu, Fedora, CentOS. We remove the route by giving specific details about route like below. We will use ip route del command and provide related parameters.

  • ip route del is the command issues for removal
  • 172.16.0.0/24 via 192.168.122.1 dev ens3  is our route to be removed. We give the full detail route so there will no space for error.

Check

We want to check the last status of our routing table. We issue the same command we issued when starting.

As we can see from the output the route to the 172.16.0.0/24 is deleted from routing table.

LEARN MORE  How To Add New Route In Ubuntu, Linux?

How To Delete Route In Ubuntu Linux? Infografic

   How To Delete Route In Ubuntu Linux? Infografic

How To Delete Route In Ubuntu Linux? Infografic

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)