For those who are new to virtual machines or have just installed Linux in a virtual machine, you need to configure the IP address yourself because the system is installed in the virtual machine. Let's configure this IP address in several steps: Step 1: Open your virtual machine, open Linux, and log in using the root account. As shown in the figure, I am using the CentOS7.2 system. After clicking to log in, enter the command interface and enter vi /etc/sysconfig/network-scripts/ifcfg-eth0 (the latter eth is different for each computer, you can press the tab key to complete it.) Follow the above instructions to enter the IP configuration interface, as shown in the figure Since I have already configured it, there will be three more fields than yours (IPADDR, GATEWAY, NETMASK).
Add IPADDR (static IP) instance 192.168.2.200 GATEWAY (gateway) 192.168.2.1 NETMASK (subnet mask) 255.255.255.0 After completion, press shift+q, enter: wq, save and exit. Then return to your virtual machine operation interface, click Edit in the virtual machine, select Virtual Network Editor, add a network and select Host-only mode. Then change the subnet IP of the network you just added to 192.168.2.0 (in my example), and the first three digits must be the same as your IP address. As shown in the figure After completing the above steps, click OK, then right-click your virtual machine, select Settings, and change your network adapter to the network you just created. As shown in the figure After exiting, enter service network restart to restart the network service Then you can use Xshell or Xftp to connect to your server. If the connection is successful, it means that your IP address has been successfully configured and you can connect. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Summary of the use of TypeScript in React projects
>>: MySQL 5.7.17 installation and configuration graphic tutorial
Table of contents docker system df docker system ...
Install the unzipped version of MySql database un...
This article example shares the specific code of ...
Prerequisite: Mac, zsh installed, mysql downloade...
The earliest computers could only use ASCII chara...
Table of contents ReactHooks Preface WhyHooks? Fo...
Table of contents Function definition method Func...
The browser displays TIF format images Copy code T...
Tomcat is widely known as a web container. It has...
1. Understanding of transition attributes 1. The ...
1. Software Introduction VirtualBox VirtualBox is...
Table of contents 1. Introduction 2. Main text 2....
Use blockquote for long citations, q for short ci...
This article shares the MySQL 5.7 installation an...
Installing and deploying a private Docker Registr...