Install the Ubuntu20.04 operating system in the Vmware Workstation virtual machine (super detailed, follow-up)

1. Download the Ubuntu20.04 image

There are many places to download Ubuntu 20.0.4 mirror in China. Here I choose "Tsinghua University Open Source Software Mirror Station"
Ubuntu 20.0.4 mirror download: click to download!

Two, Vmware Workstation installs the Ubuntu20.04 operating system

1. Use the Ubuntu image in Vmware Workstation to create a virtual machine operation

insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here

2. Install Ubuntu system operation


insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

3. Assign rootaccount password
insert image description here

sudo -i
passwd root

insert image description here

3. Set a static IP address in the Ubuntu operating system

1. Back up the configuration file of the network card
Note: The name of the network configuration file does not have to be 01-network-manager-all.yaml, the configuration file of the network is what enters /etc/netplan/the directory ls! !

cd /etc/netplan/
cp 01-network-manager-all.yaml 01-network-manager-all.yaml.default

2. Modify the network card configuration file
Note: The network card configuration file is in yaml format, pay attention to indentation when modifying, and the content must follow the yaml format! !

cat 01-network-manager-all.yaml
network:
    ethernets:
        ens33:
            dhcp4: no
            addresses:
                    - 16.32.15.123/24
            gateway4: 16.32.15.254 
            nameservers:
                    addresses:
                            - 8.8.8.8
    version: 2

3. Use the netplan apply command to take effect immediately

netplan apply 

4. Verification

ip addr

4. Ubuntu sets the domestic Ali image source

There are many mirror sources in China, here we use Alibaba Cloud mirror source
1, backup sources.list file

cp /etc/apt/sources.list /etc/apt/sources.list.back

2. Update the Alibaba Cloud address in the sources.list file.
First clear the contents of the sources.list file

cd /etc/apt/
> sources.list

Paste some content into the sources.list file

deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

3. Update the software list and software source

sudo apt-get update
sudo apt-get upgrade

4. Install vimthe command for testing

apt-get purge vim-common
apt install vim

insert image description here

5. Install sshd service and Xshell remote connection test

1. Install sshd service

sudo apt-get install openssh-server

2. Start the sshd service

/etc/init.d/ssh start

3. Verify that port 22 is enabled

ss -anput |grep 22

4. Test connection
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45310323/article/details/132117335
Recommended