CentOS 8 route command not found

I want to make change my CentOS 8 routing table temporary. But, when I use the route command my EC2 server said:

bash: route: command not found

How can I use route on CentOS 8 Linux server?

Install route command on CentOS 8

You can install route command using the following syntax

sudo dnf install net-tools

Once installed use it:

route -n
route add default gw {IP-ADDRESS} {INTERFACE-NAME}


However, I recommend using the ip command over route as it default and recommend way:

ip route show
ip route add {sub/net} dev {network_device}

See ip command:

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki