Enable the network connection service in centos 7.0 (reprinted)

Source: Internet
Author: User

After centos is installed in Enterprise Linux, the network connection service is disabled by default. You must manually start centos before using the network service. After centos 7.0 is installed, the network configuration file is in the/etc/sysconfig/network-scripts/directory. Enter the Directory and find the network configuration file: ifcfg-enp0s3 (the specific file name varies by hardware, in line with the ifcfg-en * Format), the configuration file default content is as follows:

12345678910111213141516 HWADDR=00:1C:22:AD:74:43TYPE=EthernetBOOTPROTO=dhcpDEFROUTE=yesPEERDNS=yesPEERROUTES=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_PEERDNS=yesIPV6_PEERROUTES=yesIPV6_FAILURE_FATAL=noNAME=enp0s3UUID=ae0718e7-25s9-43ra-8hp9-9d4g20a88ib1ONBOOT=no

Last ModificationONBOOT=noIsONBOOT=yesEnable the network service, save and quit.

Run the following command to restart the network service:

1 service network restart

The network service is enabled and can be used properly. The ifconfig command is usually used to view network connection information. You may find that the newly installed centos 7.0 does not support the ifconfig command and the prompt "ifconfig command not found" is displayed ", in this case, an additional network toolkit needs to be installed. The command is as follows:

12 #yum upgrade#yum install net-tools

After the installation is complete, you can use the ifconfig command to view IP addresses and other information.

 

From http://www.arcguin.com/archives/centos-7.0-start-network-service.html

Enable the network connection service in centos 7.0 (reprinted)

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.