Raspberry Pi 3B+ (Raspberry Pi 3 Model B+) install Ubuntu MATE 18.04 and simple configuration

Install Ubuntu 18.04 MATE

Download Ubuntu 18.04 MATE

Ubuntu MATE official website download Ubuntu MATE 18.04 arm64

Prepare Raspberry Pi Imager image burning tool

Raspberry Pi official website to download Raspberry Pi Imager.
Specific use of reference here .

boot

Connect the Raspberry Pi to the display and power on (5V 2A) to boot up
Boot logo

Language selection English
language setting
Set up the keyboard

You can connect to WiFi directly, or you can connect to WiFi after booting into the desktop.
Connect to WiFi

Set the account and password, to automatically connect to WiFi after the static IP is set, check

  • Log in automatically
    Set account password

Wait for booting,
waitting
waitting again
enter the desktop, connect to WiFi.

Simple configuration

Set root password

Ctrl/Command+ Alt+ TOpen terminal

sudo passwd root

Enter the account password and set the root login password.

update list

sudo apt-get update

The default source of Ubuntu feels that the Internet speed is OK, there is no need to change the source. Refer to it if necessary .
Remark: It is not recommended to execute "sudo apt-get upgrade" to upgrade the system. (For reference only)

Configure ssh service

Ubuntu MATE 18.04 has installed openssh-server by default. If openssh-server is not installed, you can execute the following command in the terminal to install

sudo apt-get install openssh-server

Open ssh service

sudo service ssh start

Set boot ssh to start automatically

sudo systemctl enable ssh

Download (extract code: 1afk) sshetckey.tar.gz and
copy sshetckey.tar.gz to /etc/ssh/

sudo cp sshetckey.tar.gz /etc/ssh/

Enter /etc/ssh/ and unzip

sudo tar xzvpf sshetckey.tar.gz

Test ssh

ssh localhost

If you can successfully enter the password to log in, the ssh configuration is successful.

Set static IP (WiFi)

Assign the URL segment 192.168.1.100~192.168.1.249 to the router, gateway: 192.168.1.1 and set the ip to: 192.168.113

Method 1 Change /etc/netplan/01-network-manager-all.yaml to the following: (pay attention to spaces and alignment)

# Let NetworkManager manage all devices on this system
network:
  version: 2
  #renderer: NetworkManager


  ethernets:
         wlan0:
                 addresses: [192.168.1.113/24]
                 gateway4: 192.168.1.1
                 nameservers:
                         addresses: [114.114.114.114, 8.8.8.8]

The terminal executes the following commands to take effect:

sudo netplan apply

Check the local WiFi IP, terminal execution

ifconfig

View wlan0 as follows

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.113  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 4006:e024:680:198a:ba27:ebff:fe2c:2992  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::82d9:2d90:7344:90b2  prefixlen 64  scopeid 0x20<link>
        inet6 4006:e024:680:198a:453e:5d1f:d92d:5d33  prefixlen 64  scopeid 0x0<global>
        ether b8:27:eb:2c:29:92  txqueuelen 1000  (Ethernet)
        RX packets 3657  bytes 695133 (695.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4235  bytes 730943 (730.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Remark : I personally feel that the vim that comes with Ubuntu MATE 18.04 is not very friendly, you can run the following command to uninstall and reinstall vim.

sudo apt-get remove vim-common
sudo apt-get install vim

Method 2 Go to the desktop, click the WiFi icon on the top toolbar, Insert picture description here
select the WiFi name to be set, and click the gear icon below.
Set up WiFi
Click IPv4 Settings, select Manual, and change to the following
Insert picture description here

Remote ssh login

Here for the Raspberry Pi username pi, static ip: 192.168.1.113
Use another computer that can log in with SSH (for example: xshell, WSL, Linux terminal in Windows), and connect this computer to the same local area network as the Raspberry Pi (Router), enter in the terminal

ssh [email protected]

After confirming yes, enter the Raspberry Pi account password to log in to the Raspberry Pi. If you are
interested, you can consider configuring the .ssh/config file, refer to here .

Remote ssh password-free login

Log in to the Raspberry Pi with SSH to the local computer.
Generate the ssh key on the local computer and enter it at the local computer terminal

ssh-keygen -t rsa

Then all the way Enter.

In the .ssh/ in the local home directory, the following file
id_rsa id_rsa.pub is generated

Use scp to upload id_rsa.pub to the .ssh/ folder in the Raspberry Pi home directory and rename id_rsa_mypc.pub

scp id_rsa.pub [email protected]:/home/pi/.ssh/id_rsa_mypc.pub

Execute the following commands in the .ssh/ folder in the Raspberry Pi's home directory

touch authorized_keys
cat id_rsa_mypc.pub >>authorized_keys

To be continued…

Guess you like

Origin blog.csdn.net/mpc123mpc/article/details/108893350