Inux system management and maintenance - ifconfig command

  

Description: Configure the network or display the current network interface status. Similar to the ipconfig command under windows, and the ifconfig command must be executed as the root user. Use format: ifconfig [options] [interface] [inet| Up| Down| Netmask| Addr| Broadcast] Option Description: See the table below for details

Option Meaning -a Displays all network interface information, both active and inactive. -s Displays only summary data for each interface, which is related to interface activity, and each interface displays one line of information. -v If an error occurs on a network interface, an error message is returned to help discover and fail.

interface: network interface name, network interface name under linux is similar to eth0, eth1, lo, etc., respectively, indicating the first network card, the second network card, loopback interface. This is an option. If you do not add this option, all the network card information in the system will be displayed. If you add this option, the specified network card information will be displayed. Up: Activate a network interface. Down: Contrary to up, invalidating the specified network interface. Netmask: Specifies the subnet mask for a specified network interface. Addr: Here “addr” is the IP address specified for the network interface. Broadcast: Sets the broadcast address for the specified interface. Example: 1. To display all network interface information of the current system, use the following command: [root@oracledb ~]# ifconfigeth0 Link encap:Ethernet HWaddr 00:13:72:40:C5:F1 inet addr:192.168.60.13 Bcast: 192.168.60.255 Mask:255.255 .255.0inet6 addr: fe80::213:72ff:fe40:c5f1/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:154657999 errors:0 dropped:0 overruns:0 frame:0TX packets:194872221 errors:0 Dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000 RX bytes:1700497213 (1.5 GiB) TX bytes:19

Copyright © Windows knowledge All Rights Reserved