How Do I Delete a Route in Linux?

How Do I Delete a Route in Linux?
Contents

How do I permanently delete a route in Linux?

How to Delete a Persistent Route on CentOS

  1. Open the terminal. …
  2. Type vi /etc/sysconfig/network-scripts/route-interface_name at the command prompt except replace the “interface_name” with the name of the network interface associated with the route. …
  3. Locate the route you wish to delete in the text file that appears.

How do I delete routes?

To delete a route:

  1. Observe the routing table entry for network destination 0.0. 0.0 listed in Activity 1. …
  2. Type ping 8.8. 8.8 to test Internet connectivity. …
  3. Type route delete 0.0. …
  4. Type route print and press Enter.
  5. Observe the active routes by destination, network mask, gateway, interface, and metric. …
  6. Type ping 8.8.
Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.