Build Ubuntu virtual machine

Build Ubuntu virtual machine

Foreword

I decided to start blogging a long time ago, but for various reasons I have n’t started yet.

I believe that for many programmers who are engaged in development, they usually have the habit of taking notes. I usually take some notes when learning a new knowledge, but it exists locally in the form of a Word document, which is often lost due to a computer change or poor management. It's a pity, so if I ask what is not on the "cloud" side, maybe I can help others.

It happened that I recently replaced a new computer and reinstalled the Ubuntu virtual machine. It is specifically recorded here. As an opening chapter, I hope to help students who want to get started with embedded development.

1. Long talk

1.1 The role of ubuntu virtual machine

Before we engage in a certain development work, the first step is to build a corresponding development environment. For Windows application development, the VS integrated development tool will be installed first. In this case, the development environment and the host are on the PC. Similarly, in the embedded field, most embedded systems are based on ARM + Linux framework structure. Whether it is application layer software development or low-level software development, the most basic we need a set of compilers to compile the corresponding program, compile The device is also a set of software, it needs to be installed on a system, that is, Ubuntu system (Linux kernel system is available), it and embedded systems are based on the Linux kernel. Because the compiler's compilation environment and the host machine (the target machine running the developed program) are not on the same platform or machine, this kind of compiler is often called a cross compiler.

It can be seen that the most important thing for the Ubuntu virtual machine is to provide an operating environment for the arm compiler, and at the same time, you can edit the code. In the end, it is a function that an operating system should have. Of course, you can also install the dual system without installing it as a virtual machine.

1.2 Why choose Ubuntu

There are many Linux distributions on the market, such as the commonly used Debian, RedHat and CentOS, the latter is often selected for the server. However, there are several reasons why Ubuntu is recommended:

  • Have a lot of software

  • Extensive community and support forum

  • User friendly and powerful

  • Stable and efficient

1.3 Tool preparation

  1. Ubuntu image

  2. VMware Workstation

The Ubuntu image can be downloaded directly on the official website. It is recommended to download a stable long-term support version, and preferably a newer version.

VMware is a paid software, you can download the cracked version online, download link: https://www.7down.com/soft/310739.html

2. Official start

2.1 Install VMware

Direct installation, no special attention

2.2 Create Ubuntu virtual machine

I use the 15Pro version of VMware here, the creation process of other versions is basically the same.

Figure 1

Then choose a custom installation ! Compatibility options can be kept as default, just click Next. The next page is as shown in the figure below, select one of the last two items, and specify the ISO file of Ubuntu when selecting the second item. The ISO file can be placed in any directory at will, because it will not be used after installation. If multiple virtual machines are installed, the third option is recommended.

Figure II

Follow the next step all the time, just follow the instructions to set it up, or keep the recommended setting, which will not be repeated here. These settings can be reset later, don't be afraid of trial and error. Some important settings are as follows:

Finally, click Finish. After the completion, because Figure 2 chooses to install the operating system later, the ISO file must be re-formulated before starting the virtual machine.

At this point, the creation of the virtual machine has been completed. After the virtual machine is turned on, the installation process of the Ubuntu system is entered. Just like the installation of the Windows system, the system installation can be completed by itself.

2.3 Install VMware Tools

2.3.1 VMware Too effect

In addition, if you want to use the shared folder function, you must also install this tool.

The first installation failed. The message suggested that we install open-vm-tools. This is because we use the latest version of VMware. Then install open-vm-tools. The effect is the same. Older versions of VMware can install VMware Tools

of.

The software package cannot be located here. We need to specify the software source as a domestic server. You can directly set it in the "Software & Updates" setting of ubuntu, and then use the following command to update the software source.

Other errors resolved:

The computer I am using is an AMD CPU. The following error occurs, and AMD-V is disabled. This option means that the AMD CPU does not enable MMU virtualization support. So we need to enter the BIOS to enable this support. Because the name of this option is different on different motherboards, Baidu can solve it by itself.

2.4 Other common services

  • samba : disk mapping, shared disk between users and win, you can access the network disk on Windows as well as the file directory of Ubuntu

  • FTP : file transfer

  • ssh : terminal control, remote login and file transfer

  • nfs : network file system, mount command directly mount access

sudo apt-get install + the package name is enough, after installation, some need to modify the configuration file and restart the service.



Guess you like

Origin www.cnblogs.com/HuangLiDi/p/12757592.html