I want to set the gateway to the particular interface via shell script.
We can modify the ethernet configuration file like this
DEVICE="eth0"
BOOTPROTO="static"
HWADDR=20:89:84:c8:12:8a
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=192.168.0.108
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS1=8.8.8.8
DNS1=8.8.4.4
But I want to do it the ip
command way. What will be the equivalent ip
command to achieve this?