ifconfig
,它提供了有关所有网络接口的信息。
运行如下命令:ifconfig | grep "Link encap"
ip
,它提供了更高级的功能。
要查询连接状态,请使用以下命令:ip link show
1: lo: mtu 65536 qdisc noqueue state UNKNOWN
2: eth0: mtu 1500 qdisc fq_codel state UP
ss
命令可以显示套接字连接信息,包括网口连接。
要使用它,请运行:ss -an | grep "state ESTABLISHED"
ethtool
命令提供更详细的信息。
要查询连接状态,请使用:ethtool eth0
上一篇:linux系统查询网络状态
下一篇:linux查询网口信息