Four ways to configure ip address under linux (graphic)

  
                  (1) Ifconfig command The first type uses the ifconfig command to configure the ip address of the NIC. This command is usually used for zero-time testing. The configuration of the ip address will automatically expire after the computer is started. The specific usage is as follows. Ipconfig ethx ipadd netmask x.x.x.x. The x in ethx represents the first few Ethernet cards. The default first block is 0.ipadd represents 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 and the subnet mask is 255.255.255.0. As shown in the following figure (the computer will restart after the ip address configured in this method will be invalid) (2) neat command Neat command = redhat-config-network graphics configuration ip address Double-click the red line under the figure Double-click the line The following figure appears: Configure related information as required. Double-click ok to complete the configuration. After the configuration is complete, restart the service and check the configuration IP address. Note (This method is configured with the ip address and the computer is still valid after the new boot) (3) netconfig command After entering netconfig, the following figure will appear, click the yes button. Ok after the relevant configuration. Note (The computer is still valid after the ip address configured in this method.) vi /etc/sysconfig/network-scripts/ifcfg-ethx Restart the service after configuration. The p address is configured. In fact, the first three configuration methods eventually changed the configuration file under /etc/sysconfig/network-scripts/ifcfg-ethx.
Copyright © Windows knowledge All Rights Reserved