How to set up a Linux environment on a Windows computer (step-by-step instructions on installing virtual machine software and using cloud servers)

There are three main ways to build a Linux environment on a Windows computer:
directly installing it on a physical machine; using virtual machine software; and using a cloud server.
Since the Linux desktop is very unfriendly to use, this article mainly describes how to use 虚拟机and 云服务器set up a Linux environment.
Note: It is not recommended to install the virtual machine on the C drive. If you refuse the Ares on the C drive, start with me!

Virtual machine to build Linux environment

To build an environment using a virtual machine, you need to download the virtual machine software VMware Workstation Playerand image files. centos7/ubuntu
The official download address of the virtual machine software: VMware Workstation Player
image file recommended download address: Tsinghua University Open Source Software Mirror Station

Step 1: Install virtual machine software

Virtual machine software installation tutorial.
Insert image description here
Open the official website and click on the free download on the VMware Workstation Player official website.
Insert image description here
After clicking, the following interface will appear and clickGO TO DOWNLOADS

Insert image description here
Because we are a Windows system, we need to download a virtual machine prepared for Windows - 64 bit, as shown in the figure.

Insert image description here
When the above interface appears, it means that the download has started. After the download is successful, just click Next. Change the installation location to the D drive (remember this address). No additional operations are required thereafter. Finally, click Install. You may need to wait for a while. meeting.

After the installation is successful, you will be prompted to enter the key. There is no need to click on the license.Click directly to complete

Step 2: Install the contos7/ubuntu image file

The virtual machine installed with the contos7 image file is convenient for typing commands, and the virtual machine installed with the ubuntu image file has a visual interface, and you can choose it as needed.
After opening the image file installation website given at the beginning of the article, the following interface will appear:
Insert image description here
Click on the 4.4GB address to start downloading the image file.
Insert image description here
It must be placed outside the C drive. If the default download address is on the C drive, you can copy the downloaded file. Finally, paste it into the D drive or E drive (remember the address). This has no effect. After the download is completed, go to the next step.

Step 3: Install the virtual machine

Open VMware Workstation Player, click Create Virtual Machine
Insert image description here
Insert image description here
, click Browse, find the address of the downloaded image file, and then click 下一步
Insert image description here
The full name here is the name of the created virtual machine.

The username is equivalent QQ号或其他账号to the password 账号密码. This account and password are the account and password used when logging in to the virtual machine.
Insert image description here
Click Browse to switch the installation location of the virtual machine.
Insert image description here
It is recommended that the size of the virtual machine is 20GB, click Next.
Insert image description here
When the preparation is complete, click Finish.
When you see the interface below, it means it is being created.
Insert image description here
The following interfaces will appear one after another.
Insert image description here
Insert image description here
Insert image description here
Once the installation is complete, click Skip this version.
The following interface appears, indicating that it has been installed. Next, you only need to enter the account and password you used when creating the virtual machine.
Insert image description here

Cloud server builds Linux environment

Note in advance: It costs money to use a cloud server, but you can try it for free for 3-4 months at the beginning.
Cloud servers include: Tencent Cloud, Alibaba Cloud, Baidu Cloud, and Huawei Cloud. Here we use Tencent Cloud as an example.

Open the official website of Tencent Cloud,
Insert image description here
log in and search in the search box 校园. If you are not under 25 years old, you cannot enjoy the student discount, just search directly 云服务器.
Insert image description here

When we normally use Linux to write code, we 2核2Gcan just use the configuration directly. It is more affordable to buy it directly for one year.

Just select the mirror configuration CentOs 7.6.

Insert image description here

After purchasing, click on the console on the main interface

Insert image description here

Enter, lightweight server options

Insert image description here
Click to reset password (you cannot log in to the cloud server without resetting the password)

Insert image description here
Insert image description here

Copy this ip address. This is your own public IP address.

Step 2: Download Xshell, this software can be used to log in to the cloud server.

Xshell download official website

Insert image description here
After downloading Xshell and opening it, the above pop-up window will appear. Just click on the wrong number.

Insert image description here
Enter: in this terminal interface ssh root@公网IPto start logging in to the cloud server.
After entering the reset password, click OK.
Insert image description here
Seeing last login indicates that the cloud server login is successful.
Then you only need to open it in the future Xshellto log in to the cloud server and use Linux.

Guess you like

Origin blog.csdn.net/zyb___/article/details/132993488