Set the network connection after CentOS 7 Installation

Source: Internet
Author: User

Set the network connection after CentOS 7 Installation

The minimal installation in CentOS. The network cannot be connected because the default Nic is not activated. Just set it.

Run the command cd/etc/sysconfig/network-scripts to press enter.

Enter ls and press enter

The following files are displayed. We are looking for the arrows in the image.

Then open it with the text edit tool, enter the command vi ifcfg-eno16777736 and press enter

Some key-value pairs will appear, and what we need to change is indicated by the arrow, which indicates activating the NIC.

Press I to enter the editing mode, change no to yes, Press ESC, and enter wq (wq indicates saving and exiting)

After that, you will find that the file cannot be properly saved because you must use the root permission to modify the file. Do not save and exit, enter su and press enter

After entering the root password (the password is not displayed), press enter. Repeat the preceding steps to open the file and save the modification.

Restart NIC: service network start is OK

Then you can connect to the network and install some packages you need.

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.