Centos 7 can't access the Internet solution

Source: Internet
Author: User

  1. First, right-click on the desktop and click "Open in Terminal".

  2. Then, as shown, enter: Su, press ENTER after entering their root password; Note that the password area does not show anything when the password is lost Oh, you lose the wrong to more than a few backspace on the line, after the success in the command before the symbol will become #.

  3. As shown, input: ls/etc/sysconfig/network-scripts/, pay attention to the part of the red line, you may and I do not quite the same, remember or copy down the line, the following to use, the following steps in the "eno16777736" are replaced by their own on the line.

  4. Then enter, cat/etc/sysconfig/network-scripts/ifcfg-eno16777736, here the "eno16777736" for their own on the line, the following steps are also true.

  5. Note the following red Circle section, if you are showing the "Onboot=no", you will not be able to surf the Internet. Let's change it to "yes".

  6. Then enter: vi/etc/sysconfig/network-scripts/ifcfg-eno16777736, or change VI to gedit, more convenient to modify.

  7. Under VI, the "no" is changed to "Yes", and then enter ": w", if not modified, according to the above tips, the VI into gedit, easy to modify, after the change can be saved.

  8. Then the VI Editor will appear in the red circle of the section, it succeeded.

  9. 9

    Then enter the terminal, also with the root account, enter "Shutdown-r now", and then the system restarts. After booting the password into the operating system, and then re-change the root account into the terminal.

    Now the computer will be able to surf the internet, the need to continue to look down, the following set fixed IP.

  10. 10

    , enter "IP add", the command after the completion of the line to note the portion of the row, remember or copy down, the next set to fixed IP.

  11. 11

    In the terminal, enter "gedit/etc/sysconfig/network-scripts/ifcfg-eno16777736", for example, add the following four line parameters at the end of the text. The first line is IP, the second line is just like me, and the third and fourth lines change the last part of the IP to "1" on the line.

    Configuration complete, terminal input "Shutdown-r now" can be.

Centos 7 can't access the Internet solution

Related Article

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.