树莓派4B配置ubuntu18.04.5

1 SD Card Formatter格式化sd卡

2 Win32DiskImager 烧录镜像

ubuntu-18.04.5-preinstalled-server-arm64+raspi3

3 在system.boot中新建SSH的空白文件

4 连好电源和网线,用ipscanner查树莓派IP

5 使用PuTTY登录,开始的默认名称和密码都是 ubuntu ,需要修改密码

6 换源

7 安装桌面完整版

sudo apt-get install ubuntu-desktop

8 从网站上下载安装脚本
https://pan.baidu.com/s/1m0ahUdc9tfrREgNyKeazUA 提取码:odcs

9 通过WinSCP完成脚本的传送

chmod +x ~/xrdp-installer-1.2.sh
./xrdp-installer-1.2.sh

10 windows搜索远程登陆

在Windows下同时按下win+R键,输入mstsc然后回车(也可以直接搜索),打开远程桌面,输入ip地址点击连接,弹出Login to ubuntu对话框,session选择Xorg,l输入ubuntu的用户名和密码,点OK,登录成功!!!

11 连自己的笔记本热点
下载一个猎豹免费wifi
设好密码

12 配置无线网

cd /etc/netplan/
sudo vim 50-cloud-init.yaml
    # This file is generated from information provided by the datasource.  Changes
    # to it will not persist across an instance reboot.  To disable cloud-init's
    # network configuration capabilities, write a file
    # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
    # network: {config: disabled}
    network:
        ethernets:
               eth0:
                  dhcp4: false
                  dhcp6: no
                  addresses: [192.168.1.111/24]
                  gateway4: 192.168.1.1
         wifis:
            wlan0:
               dhcp4: true
               access-points:
                        "猎豹无线网的名字":
                              password: "无线网密码password"
        version: 2

这里要注意缩进!!!!

启用

sudo netplan try
sudo netplan apply
systemctl daemon-reload

13 在猎豹上能看到自己的热点下有ubuntu的连接,通过IP再次远程访问(不用网线)

参考:

https://blog.csdn.net/qq_45779334/article/details/108969323?spm=1001.2014.3001.5506

https://blog.csdn.net/weixin_43315707/article/details/107518380

https://blog.csdn.net/zx3517288/article/details/109889688?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.control