How To Delete Route In Ubuntu Linux?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/delete-route-ubuntu-linux/
PINTEREST
PINTEREST
INSTAGRAM

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.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/delete-route-ubuntu-linux/
PINTEREST
PINTEREST
INSTAGRAM
LEARN MORE  Router vs Modem What Is Different and What Is The Same?