在 Linux 系統中,ifconfig 命令主要用于配置和顯示網絡接口的信息,而不是用于查看路由表。要查看路由表,您應該使用 route 或 ip route 命令。
route 命令:route -n
-n 選項表示以數字形式顯示地址,不進行 DNS 解析。
ip route 命令:ip route show
或者簡寫為:
ip route
這兩個命令都會顯示當前系統的路由表。如果您想查看更詳細的信息,可以使用 route -n 或 ip route show <destination>,其中 <destination> 是您想要查看的特定目標地址。