ubuntu 获取 gateway 网关 ip

输入以下命令,第一行中 Gateway 列就是网关 IP

netstat -rn
原文地址:https://www.cnblogs.com/myesn/p/15768433.html