ifconfig
是一个用于配置和显示 Linux 内核中网络接口的命令行实用程序。在 Debian 系统中,你可以使用 ifconfig
命令来查看和管理网络接口。以下是一些实战技巧:
ifconfig
ifconfig eth0
sudo ifconfig eth0 up
sudo ifconfig eth0 down
sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0
sudo ifconfig eth0 0.0.0.0
sudo ifconfig eth0 broadcast 192.168.1.255
ifconfig eth0 | grep hw
sudo ifconfig eth0 mtu 1400
ifconfig
命令监控网络流量:sudo ifconfig eth0
在终端中运行此命令后,你将看到实时的网络流量统计信息。
请注意,ifconfig
命令在某些 Debian 版本中可能已被弃用,取而代之的是 ip
命令。尽管如此,ifconfig
仍然在许多系统中广泛使用。如果你使用的是较新的 Debian 版本,可以尝试使用 ip
命令执行类似的操作。