ifconfig
是一个用于配置和显示 Linux 内核中网络接口的命令行实用程序。在 CentOS 系统中,您可以使用 ifconfig
命令来查看和管理网络接口。以下是一些常用的 ifconfig
命令选项和用法:
ifconfig
ifconfig eth0
ifconfig eth0 up
ifconfig eth0 down
ifconfig eth0 192.168.1.100 netmask 255.255.255.0
ifconfig eth0 0.0.0.0
ifconfig eth0 mtu 1400
ifconfig eth0 broadcast
ifconfig eth0 hw ether
请注意,ifconfig
命令在某些 Linux 发行版中可能已被弃用,取而代之的是 ip
命令。在使用 CentOS 7 或更高版本时,您可能需要使用 ip
命令来执行类似的操作。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>