The operating system

What is an operating system

nature

  • The middle layer between hardware drivers and application software
  • Allows the same application to run on different hardware

Constitute a

  • Kernel Kernal hardware, driver, API
  • Shell Terminal, GUI (KDE, GNONE)
  • Peripheral tools

Common Operating Systems

  • PC
  • MAC
  • Windows
  • Linux

The mobile terminal

  • Android
  • IOS

Run the Linux VM

  1. Enter the VMware Workstation

  1. Select Start vm

  1. Select the VMX file

4. Select the appropriate SettingsThis network adapter option is described below

There are several patterns


Bridge mode is to provide a new IP address for the virtual machine

In NAT mode, the host and VM share the same IP address. Is to make your host a switch.

Install the Go development environment

You can use the apt-get command to install:

sudo apt-get install golang

You can also download The Go Language file and install: Go to Downloads – The Go Programming Language golang.org/dl/

Then select the latest GO installation package

Wget HTTP: / / https://golang.org/dl/go1.16.3.linux-amd64.tar.gz

Run tar to decompress the directory /usr/loacl to obtain the go folder

Tar -c /usr/local-zxvf go1.16.3.linux-amd64.tar.gz

Add /usr/loac/go/bin to the PATH variable. Add to /etc/profile or $HOME/.profile

vim /etc/profile

Then add:

export GOROOT=/usr/local/go

export GOPATH=/home/go_work

export PATH=$PATH:$GOROOT/bin

Save the file source /etc/profile

Then type Go Version and the results will show that the installation was successful.

Write your first Go program in Linux

  1. Go to the GoPATH directory first

2. Edit the main.go file

3. Enter the following code

4. Go build go file

5. Run