Configure IP address four ways to easily learn about Linux friends

Source: Internet
Author: User

(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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.