在 Debian 系统中,你可以使用 ifconfig 命令来查看网络接口的信息。以下是如何使用该命令的步骤:
打开终端。
输入以下命令并按下回车键:
ifconfig
你将看到系统中所有活动的网络接口及其相关信息,包括:
eth0、wlan0 等接口名称UP 或 DOWN)如果你只想查看特定的网络接口,可以在 ifconfig 后面指定接口名称,例如:
ifconfig eth0
如果你发现 ifconfig 命令没有安装,可以通过以下命令安装 net-tools 包来获取 ifconfig:
sudo apt update
sudo apt install net-tools
请注意,在较新的 Debian 版本中,ip 命令已经取代了 ifconfig 作为网络配置和管理的主要工具。使用 ip addr show 可以达到类似的效果。