CentOS Virtual machine Enable NIC

Source: Internet
Author: User

After the installation of the CentOS virtual machine is successful, the gateway is not enabled by default, and the network adapter is enabled by modifying the configuration file

  1. After editing the system configuration file, the virtual machine completes, the system installs a default network card, namely eth0, its configuration file path is/etc/sysconfig/network-scripts/ifcfg-eth0, enters the command in the system terminal: vi/etc/ Sysconfig/network-scripts/ifcfg-eth0, start the VI editor to edit this file

  2. Edit the default NIC configuration file, change Onboot from No to Yes, edit complete, press ESC to return to the command template, enter ": Wq", return, save the changes and exit

  3. After modifying the configuration file, it does not take effect immediately and requires the network service to reload the configuration file for the modification to take effect. Enter the command in the system Terminal: Service Network Reload

  4. 5

    Enter the command in Terminal: Ifconfig, can see the output information, the system default network card Eth0 has been started

  5. If the restart failure occurs

  6. <ignore_js_op>
  7. The beginning of the time because it is dial-up Internet, no route only one IP selected bridge mode, so on the virtual machine can not surf the internet, also appeared the title said that situation, later changed to NAT in the configuration file to the static change to DHCP can be, and then to use the Development Board, the Development Board to ping with Linux , but also can be online add a route, and in the virtual machine added a network card, network card 1eth0 or NAT for the Internet, and Nic 2 eth1 for bridging, with the Development Board set up the same segment of the network, and then there can only be a network card connection problems, and then the configuration file/etc/sysconfig /network-scripts/ifcfg-eth0 and/etc/sysconfig/network-scripts/ifcfg-eth1 nm_controlled= "yes" changed to "No", and then run Chkconfig NetworkManager off

CentOS Virtual machine Enable NIC

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.