Configure IP address four ways to easily learn about Linux friends
(1) Ifconfig command
The first is to configure the IP address of the NIC using the Ifconfig command. This command is typically used to test for zero, and after the computer starts
The configuration of the IP address is automatically invalidated. The specific usage is as follows. Ipconfig ethx ipadd netmask x.x.x.x.
where x in ETHX represents the Fast Ethernet card, the default first block is 0.ipadd for the IP address. x.x.x. X is the subnet mask. For example, the IP address configured for the NIC Eth0 is 192.168.1.1 The subnet mask is 255.255.255.0. As the following
Note (the IP address configured by this method will invalidate the computer from the new boot)
(2) Neat command
Neat command to configure IP address under =redhat-config-network graphics
Double-click the part of the red line below the picture
Double-clicking the underlined section appears as follows: Configure relevant information as required
Double-click OK to complete the configuration. Restart the service after configuration and view the configured IP address.
Note (This method configures the IP address after the computer is still active from the new boot)
(3) Netconfig command
After entering Netconfig, it will appear as shown, click the Yes button.
After the relevant configuration, OK exits.
Note (This method configures the IP address after the computer is still active from the new boot)
( 4 ) Vi/etc/sysconfig/network-scripts/ifcfg-ethx
Restart the service after the configuration is complete. The P address is configured. In fact, the previous 3 configuration method eventually changed the configuration file under/etc/sysconfig/network-scripts/ifcfg-ethx.
Configure IP address four ways to easily learn about Linux friends