Home > Article > Computer Tutorials > Detailed explanation of the usage of network command ifconfig.
ifconfig is a commonly used network command used to display and configure network interface information. The following is a detailed explanation of the ifconfig command:
Command format:
ifconfig [网络接口] [选项]
Common options:
Example usage:
Display information about all network interfaces:
ifconfig -a
Enable network interface:
ifconfig eth0 up
Disable network interface:
ifconfig eth0 down
Display the IPv4 address and subnet mask of the specified network interface:
ifconfig eth0 inet
Display the IPv6 address and subnet mask of the specified network interface:
ifconfig eth0 inet6
Display the broadcast address of the specified network interface:
ifconfig eth0 broadcast
Display the hardware address (MAC address) of the specified network interface:
ifconfig eth0 hw ether
Set the specified network interface to promiscuous mode:
ifconfig eth0 promisc
The ifconfig command provides various information about the network interface, such as IP address, subnet mask, broadcast address, hardware address, etc. By becoming familiar with and using the ifconfig command, you can manage and adjust the configuration of network interfaces. Please note that ifconfig has been replaced by the ip command in some Linux distributions, but it is still one of the commonly used commands on many systems.
The above is the detailed content of Detailed explanation of the usage of network command ifconfig.. For more information, please follow other related articles on the PHP Chinese website!