How can I connect linux to the Internet and implement communication between hosts and virtual machines ?, Linux Virtual Machine

Source: Internet
Author: User

How can I connect linux to the Internet and implement communication between hosts and virtual machines ?, Linux Virtual Machine

When the network is not configured, the linux virtual machine does not have a network, and the host and virtual machine cannot communicate with each other.

How to connect linux to the Internet and implement communication between hosts and virtual machines

Part I: because the visual desktop is not installed when the virtual machine operating system is installed, how to manually set the static IP address of the linux system?

1. If it is not an administrator user, switch to the administrator user (other users do not have the permission to modify the IP configuration file)

2. Enter the command: vi/etc/sysconfig/network-scripts/ifcfg-eth0 to enter the setting file of the IP address, and then press Ins to edit the file

INSERT is displayed below, which indicates you can edit

Change content to the content in the red box

4. After modification, Press ESC first, press:, enter wq, and press enter to save and exit.

5. Enter the command ip address addr. For example, if you find that the ip address has changed to a static ip address set by yourself (if you cannot shut down, restart and try again)

6. ping 192.168.137.21 on the host and find that the pin is available. This indicates that the host can communicate with the VM.

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.