在 Linux 系统中,ifconfig 命令主要用于配置和显示网络接口的信息,而不是用于查看路由表。要查看路由表,您应该使用 route 或 ip route 命令。
route 命令:route -n
-n 选项表示以数字形式显示地址,不进行 DNS 解析。
ip route 命令:ip route show
或者简写为:
ip route
这两个命令都会显示当前系统的路由表。如果您想查看更详细的信息,可以使用 route -n 或 ip route show <destination>,其中 <destination> 是您想要查看的特定目标地址。