ifconfig
是一個用于配置和顯示 Linux 內核中網絡接口的命令行實用程序。在 Debian 系統中,你可以使用 ifconfig
命令來執行許多網絡相關的任務。以下是一些常用的 ifconfig
命令行操作技巧:
ifconfig
eth0
的接口):ifconfig eth0
eth0
的接口):sudo ifconfig eth0 up
eth0
的接口):sudo ifconfig eth0 down
eth0
的接口分配 IP 地址 192.168.1.10
):sudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0
eth0
的接口的 IP 地址):sudo ifconfig eth0 0.0.0.0
eth0
的接口的 MTU 更改為 1400):sudo ifconfig eth0 mtu 1400
ifconfig eth0 broadcast
sudo ifconfig eth0 promisc
sudo ifconfig eth0 -promisc
請注意,ifconfig
命令在一些新的 Linux 發行版中可能已被棄用,取而代之的是 ip
命令。盡管如此,ifconfig
仍然在許多系統中廣泛使用。如果你使用的是較新的 Debian 版本,可以嘗試使用 ip
命令來執行類似的操作。