【Linux】Linux environment configuration and installation

Table of contents

1. Dual system (especially not recommended)

Disadvantages of installing dual systems:

Advantages of installing dual systems (experienced players only):

2. Virtual machine + centos7 image (more recommended)

Advantages of virtual machines:

Disadvantages of virtual machines:

Download the image file of centos 7

 Download Ubuntu image file Ubuntu image file download address 

3. Cloud server

Xshell cloud server sharing

Xshell delete user

4. powershell


1. Dual system (especially not recommended)

We install the Linux operating system directly in our laptops and select the operating system when booting. However, it is not recommended to change the operating system and restart. If there is a problem with the Linux system, the Windows system may also crash. The advantages and disadvantages of dual systems are summarized below. , it is very unfriendly to novices and very frustrating, so it is not highly recommended.

Disadvantages of installing dual systems:

  1. Causes the boot speed to slow down: When installing dual systems, we will have an extra startup item when booting. If the user does not start the system by default, he needs to jump to the running system interface when booting, and we need to manually select which one to run. The system can do this, but this will easily cause the boot time to become longer.

  2. Installing dual systems will occupy hard disk capacity: If your hard disk capacity is large enough, the impact will be small, but if your hard disk space is too small, installing dual systems will be a burden. You can understand this. , today’s hard drives are very large and this problem can be ignored.

  3. Dual-system menus are prone to problems: When we use dual-systems, we occasionally encounter problems with dual-system menus. In this case, it is particularly easy to make it impossible to enter both systems.

Advantages of installing dual systems (experienced players only):

  1. Test compatibility: The computer is installed with dual systems, one old and one new (win7/win10). Users can debug software or games in different environments according to their needs to achieve testing purposes, while for ordinary users, When we install certain software, we have strict requirements on the system. We install the system bits that support the software.

  2. Experience the functions of different operating systems: Generally speaking, the two systems we use most are win7/win10. If it is really difficult for you to give up these two systems, you can install dual systems to experience the functions of different operating systems. Different functions.

  3. Convenient anti-virus: If the computer is accidentally poisoned, we only need to open another system and destroy it in the other system. However, we need to remind everyone that it is best to use two systems with different kernels.

  4. Convenient data backup: In fact, system damage accounts for the majority of system problems and failures. The advantage of installing dual systems is that it can prevent one system from being broken. We can enter the other system to use data and work normally, or we can directly restore the broken system. The important data inside is copied out to prevent data loss.


2. Virtual machine + centos7 image (more recommended)

Advantages of virtual machines:

  • Both systems can run simultaneously. The applications of the two systems can work together. For example, Linux runs a website server and uses IE under Windows to see the effect; or the output results of the program under Linux can be used as information in documents written under Windows. It is also very convenient to exchange data, and any network sharing method is acceptable, such as Windows sharing (smb), FTP, SFTP, etc. In addition, it is also very convenient to switch between the two systems through remote desktop , VNC, Xclient, etc.
  • Configuration is relatively simple and convenient. If you use graphical virtual machine software, it is convenient and simple to set up and adjust the hardware configuration of the virtual machine. The system for installing the host system and the virtual machine is not much different from an ordinary computer.

Disadvantages of virtual machines:

  • High requirements for hardware configuration. It's okay if the CPU can be shared, but you also need to choose a model that supports virtualization , otherwise the performance of the virtual machine will be very poor. Memory must be configured with the sum of the requirements of the two systems and the software running on them - including the necessary reserved capacity. The increased capacity can range from 1-2G to 8-16G or even 32 or 64G, depending on the needs of the virtual machine. The memory requirements of running applications. Although some virtual machine software such as hyper-v supports dynamic memory, the performance is poor and the system in the virtual machine needs to install the corresponding driver. In general, the system performance of running a virtual machine with the same hardware resources is always worse than running it directly on a physical machine.
  • Virtual machines do not have direct access to all hardware. Although there are some virtual machine software solutions that allow virtual machines to access hardware, there are limitations. For example, the workstation version of vmware can only allow the virtual machine system to access USB devices, and N card pass-through is still a problem, etc.

VMware player official website link

After entering the official website, download the 64-bit Windows version. 

 Download the image file of centos 7

centos 7 image file download address

Download files marked with red boxes 

 

 Download Ubuntu image file
Ubuntu image file download address 

Here you can also download the files marked with red boxes 

 

 After the file is downloaded, open our VMware, click to create a virtual machine, load the image file into it, and finally set the user name and password.

Note: We need to run VMware as an administrator, otherwise the configuration will not be successful.

A successful login looks like:

3. Cloud server

The real development and production environment of the cloud server is real enough. There are many cloud server manufacturers on the market, including Tencent Cloud, Alibaba Cloud, and Huawei Cloud. The cloud servers here need to be purchased by yourself. Each manufacturer has its own promotions. For example, Tencent Cloud has its own campus cloud server, which is very cost-effective. There are even some that can be used for free for several months. If you can, you can get it for free . One advantage is that you can share it with your good friends, and it only costs a few dollars a month on average.

Tencent Cloud official website

 

Alibaba Cloud official website

Huawei cloud official website 


Xshell cloud server sharing

Xshell download official website

Here I have used Huawei Cloud that I purchased as an example to demonstrate to you.

Reset your password after purchasing a cloud server 

Find your own public network IP, open the Xshell software and use the command: ssh root@your own public network IP, press Enter and enter your own password (ps: just next when logging in to your server for the first time)

 After successful login, enter adduser to set the username of your friend, and enter passwd to set the password of the username;

ps: The password entered by Xshell will not be echoed (that is, it will not be displayed on the video screen) and needs to be entered twice.

After the creation is successful, your friend can log in using ssh username@public IP

Xshell delete user

One day you and your friend have a falling out. If you want to delete your good friend, you can use the command userdel -r username to delete the user, so that he cannot log in.


4. powershell

PowerShell is a software owned by Microsoft, but it is not very practical to use. It will not be introduced in detail here, and it is not recommended. 

Guess you like

Origin blog.csdn.net/qq_55119554/article/details/133106592