CentOS 7 How to set Linux boot auto Get IP address

Source: Internet
Author: User
Tags get ip
CENTOS7 version minimal is installed by default and does not acquire an IP address and requires manual configuration. Here's how:

1. Enter "IP addr" and press ENTER to confirm that the IP is not available (CentOS 7 does not have ifconfig command by default), and the name of the network adapter is recorded (Ens33 in this example).
2. Enter "cd/etc/sysconfig/network-scripts/" press ENTER to confirm, continue to enter "LS" press ENTER to view the file.
3. Enter "VI ifcfg-ens33" and press ENTER to confirm (the NIC name may be different). You can also directly edit the file by entering "Cd/etc/sysconfig/network-scripts/ifcfg-ens33" directly in the second step.
4. Look at the last item (in the Blue box) and find it as "Onboot=no".
5. Press "I" key to enter the editing state, the last line "No" is modified to "yes", then press "ESC" key to exit the edit state, and enter ": X" to save exit.
6. Enter "Service network restart" to restart the services, or enter "Systemctl restart Netwrok".
7. Re-enter "IP addr" To view, now automatically obtain the IP address.

Transferred from: http://www.ytyzx.net/index.php/%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AECentOS_7%E8%8E%B7%E5%8F%96%E5%8A%A8%E6% 80%81%e5%8f%8a%e9%9d%99%e6%80%81ip%e5%9c%b0%e5%9d%80

CentOS 7 How to set Linux boot auto Get IP address

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.