Install Ubuntu 20.04 on Raspberry Pi 4B

1. Preparation of Raspberry Pi

  1. Into the Ubuntu official website to download the support Raspberry Pi version of Ubuntu installation package.
  2. Use DiskGenius to format the SD card, delete all sectors, and then format.
  3. Download the official burning tool , select the .xz file just downloaded for the mirror image, select your own card for the SD card, and just write it.

Two, Ubuntu system configuration

2.1 Enter Ubuntu system

Insert the TF card into the Raspberry Pi. The system can be initialized and configured through the display, or the Raspberry Pi can be connected to the computer with a network cable for remote configuration. It is recommended to use an external monitor, the operation will be much simpler. Take the use of an external screen + keyboard as an example (these devices only need to be used once)

  1. Insert the previously made SD card into the Raspberry Pi, and connect the power supply to the Raspberry Pi (the power supply can be a 2.5mm round head power cord, or a microUSB or TypeC interface line, but the charging head is required to reach 5V 3A, the minimum 5V 2.5A)
  2. Power on, wait for a period of time to enter the system, you first need to log in, the initial user name and password are both ubuntu , after logging in, you will be asked to reset the password.

2.2 wifi settings

cd /etc/netplan

In this directory, if it is a server, there will be a 50-cloud-init.yaml file, if it is a desktop environment, there will be a 01-network-manager-all.yaml,
where 50-cloud-init.yaml is For example, edit a file:
pay attention to the indentation format of the file,

network:
  version: 2
  wifis:
    wlan0:
      dhcp4: true
      optional: true
      access-points:
        "你的wifi名称":
          password: "wifi密码"

Then execute the command to make the configuration effective

sudo netplan generate
sudo netplan apply

Enter the command ifconfigto view the ip address, and use the remote access tool to access it.

2.3 Update source

sudo vim /etc/apt/sources.list

source.list content

deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal main main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
# deb https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse

Update

sudo apt-get update
sudo apt-get upgrade

2.4 Install the desktop environment

sudo apt install ubuntu-desktop
sudo apt install xrdp

2.5 Install Chinese environment

sudo apt install language-pack-zh-hans language-pack-zh-hans-base language-pack-gnome-zh-hans language-pack-gnome-zh-hans-base
sudo apt install `check-language-support -l zh`
sudo reboot

2.7 Allow root login

sudo passwd root #设置root密码
sudo vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf #编辑此文件

Add the following two lines to 50-ubuntu.conf

greeter-show-manual-login=true
allow-guest=false

2.8 Remote Desktop Connection

Type in the windows search box 远程桌面连接, select Xorg mode, and enter your username and password to connect.

Guess you like

Origin blog.csdn.net/weixin_44543463/article/details/113820331