在 Debian 系统中,你可以使用 ifconfig
命令来查看网络接口的配置信息,但它不会直接显示网络流量统计。如果你想查看网络流量,可以使用其他工具,比如 ip
, nethogs
, 或者 iftop
。
以下是一些常用的方法:
使用 ip
命令:
ip addr show
ip -s link
使用 nethogs
:
nethogs
是一个实时监控网络流量的工具,可以按进程查看流量使用情况。nethogs
:sudo apt install nethogs
sudo nethogs eth0 # 将 eth0 替换为你的网络接口名称
使用 iftop
:
iftop
是一个实时显示网络带宽使用情况的工具。iftop
:sudo apt install iftop
sudo iftop -i eth0 # 将 eth0 替换为你的网络接口名称
这些工具可以帮助你监控和分析网络流量。如果你只是想查看接口的基本配置和状态,ifconfig
和 ip addr show
是很好的选择。