ifconfig
是一个用于配置和显示 Linux 内核中网络接口的命令行实用程序。在 CentOS 系统中,你可以使用 ifconfig
命令来查看和管理网络接口。
以下是一些常用的 ifconfig
命令用法:
ifconfig
ifconfig eth0
ifconfig eth0 up
ifconfig eth0 down
ifconfig eth0 192.168.1.100
ifconfig eth0 0.0.0.0
ifconfig eth0 netmask 255.255.255.0
请注意,ifconfig
命令在某些 Linux 发行版中可能已被弃用,取而代之的是 ip
命令。在使用 CentOS 8 或更高版本时,建议使用 ip
命令来管理网络接口。