树莓派安装 Ubuntu 20.04 LTS 碰壁指南

设备 Raspberry 4B 4+32G

系统 Ubuntu 20.04 LTS

1.镜像下载与烧录

镜像下载地址:https://cdimage.ubuntu.com/releases/20.04.1/release/ubuntu-20.04.1-preinstalled-server-arm64+raspi.img.xz

烧录工具

SD Card Formatter

Win32DiskImager

2.启用root账户

输入命令后根据提示操作

su passwd root

3.无线网络连接初始化

进入netplan配置文件夹

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: true
optional: true
version: 2
wifis:
wlan0:
dhcp4: true
optional: true
access-points:
"你的无线网络名称":
password: "123456789"

注意在冒号后面,记得要有个空格或者换行

启用配置

sudo netplan try
sudo netplan apply
systemctl daemon-reload

4.更换树莓派国内镜像源

sudo vim /etc/apt/sources.list

我全部更换为阿里镜像源,最终配置如下

## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
#deb http://ports.ubuntu.com/ubuntu-ports focal main restricted
deb https://mirrors.aliyun.com/ubuntu-ports/ focal main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports focal main restricted ## Major bug fix updates produced after the final release of the
## distribution.
#deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted
deb https://mirrors.aliyun.com/ubuntu-ports/ focal-updates main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
#deb http://ports.ubuntu.com/ubuntu-ports focal universe
deb https://mirrors.aliyun.com/ubuntu-ports focal universe
# deb-src http://ports.ubuntu.com/ubuntu-ports focal universe
#deb http://ports.ubuntu.com/ubuntu-ports focal-updates universe
deb https://mirrors.aliyun.com/ubuntu-ports focal-updates universe
# deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
#deb http://ports.ubuntu.com/ubuntu-ports focal multiverse
deb https://mirrors.aliyun.com/ubuntu-ports focal multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports focal multiverse
#deb http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse
deb https://mirrors.aliyun.com/ubuntu-ports focal-updates multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse ## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
#deb http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu-ports focal-backports main restricted universe multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner #deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted
deb https://mirrors.aliyun.com/ubuntu-ports focal-security main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports focal-security main restricted
#deb http://ports.ubuntu.com/ubuntu-ports focal-security universe
deb https://mirrors.aliyun.com/ubuntu-ports focal-security universe
# deb-src http://ports.ubuntu.com/ubuntu-ports focal-security universe
#deb http://ports.ubuntu.com/ubuntu-ports focal-security multiverse
deb https://mirrors.aliyun.com/ubuntu-ports focal-security multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports focal-security multiverse

刷新镜像源

source source.list
apt get update
apt get upgrade

4.启用SSH(*)

sudo apt install openssh-server

查看ssh状态

防火墙端口放行SSH

ufw allow ssh

尝试一下用默认账户连接(我尝试失败,您可以一试)

方法一:修改sshd_config

参考 https://blog.csdn.net/john1337/article/details/109465781

修改配置文件

sudo vim /etc/ssh/sshd_config

在vim中搜索定位PermitRootLogin,可直接查找:

/PermitRootLogin

修改以下配置:

33 #LoginGraceTime 2m

34 #PermitRootLogin prohibit-password

35 #StrictModes yes

36 #MaxAuthTries 6

37 #MaxSessions 10

修改为:

 LoginGraceTime 2m
PermitRootLogin yes
StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
  1. 重启ssh,使配置生效
sudo service ssh restart

现在可是使用root用户登录ssh了!!!

方法二:建立新用户(*)

我使用该方法完成ssh连接

不知为何默认账户ubunturoot无法进行SSH连接认证,但是可以通过自己添加账户进行SSH连接

直接输入

adduser your_username

按照指示配置新用户信息,最后使用该用户名称完成SSH连接

5. BT宝塔面板安装

wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh

参考文档

1.https://blog.csdn.net/zx3517288/article/details/109889688

2.https://blog.csdn.net/john1337/article/details/109465781

3.https://blog.csdn.net/qq_35975447/article/details/105858964

树莓派安装 Ubuntu 20.04 LTS 碰壁指南的更多相关文章

  1. 树莓派初体验,安装Ubuntu 14.04 LTS

    转载自:http://www.polarxiong.com/archives/%E6%A0%91%E8%8E%93%E6%B4%BE%E5%88%9D%E4%BD%93%E9%AA%8C-%E5%AE ...

  2. win10 + Ubuntu 20.04 LTS 双系统 引导界面美化

    版权声明:本文为CSDN博主「ZChen1996」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明. 原文链接:https://blog.csdn.net/ZChen1 ...

  3. Windows10 + Ubuntu 20.04 LTS 双系统安装 (UEFI + GPT)(图文,多图预警)

    版权声明:本文为CSDN博主「ZChen1996」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明. 原文链接:https://blog.csdn.net/ZChen1 ...

  4. VirtualBox 安装 Ubuntu 20.04 全流程

    VirtualBox 安装 Ubuntu 20.04 全流程 内容概要 这个作业属于哪个课程 2022面向对象程序设计 这个作业要求在哪里 2022面向对象程序设计寒假作业1 这个作业的目标 在虚拟机 ...

  5. ubuntu 14.04 lts安装教程:u盘安装ubuntu 14.04 lts步骤

    绿茶小编带来了ubuntu 14.04 lts安装教程,下文详细讲解了u盘安装ubuntu 14.04 lts的步骤,很简单,只需要一个工具就能够轻松使用u盘安装ubuntukylin 14.04系统 ...

  6. VMware Workstation 14 PRO 下安装Ubuntu 16.04 LTS教程

    一.准备好安装的VMware Workstation 14 PRO 1.VMware Workstation 14 PRO下载链接:http://rj.baidu.com/soft/detail/13 ...

  7. t420 win7 硬盘安装ubuntu 10.04 LTS 备忘

    http://zhangwen.sinaapp.com/?p=5 t420 win7 硬盘安装ubuntu 10.04 LTS 备忘 发表于 2011 年 10 月 25 日 对ubuntu的新版没有 ...

  8. U盘安装Ubuntu 14.04 LTS正式版

    Ubuntu 14.04 LTS正式版发布,而且提供五年的支持和维护服务.Ubuntu 14.04是Ubuntu开发团队历经五年的心血之作.许多新手都喜欢把Linux安装文件刻录成光盘再安装,而安装好 ...

  9. 记录2-在mac上安装ubuntu 16.04 LTS

    前几天升级了我用了六七年mac硬件,内存由4G变为8G,硬盘也换成1T SSD,索性把一直想装的ubuntu也装了,方便温习下以前的工作环境. 我比较喜欢LTS的版本,所以安装了16.04. 主要步骤 ...

随机推荐

  1. 【Azure Service Bus】 Service Bus如何确保消息发送成功,发送端是否有Ack机制 

    问题描述 Service Bus如何确保消息发送成功,发送端是否有Ack机制(是否有回调API告诉发送端,服务端已经收到消息)?根据对.NET发送Service Bus消息代码的分析,发送方法queu ...

  2. Java基础进阶:继承重点摘要,继承详解,方法重写注意事项,方法重载与重写的区别,抽象类,代码块, 附重难点,代码实现源码,课堂笔记,课后扩展及答案

    继承重点摘要 *继承的特点: 子类在初始化之前,一定要先完成父类数据的初始化 子类在初始化之前,一定要先访问父类构造,完成父类数据的初始化 系统在每一个构造方法中默认隐藏了一句super(); 如果我 ...

  3. winform使用Barcodex控件预览和打印一维码

    1.控件下载. http://files.cnblogs.com/files/masonblog/barcodex.zip . 包含barcodex.ocx控件.barcodex帮助文档.两个winf ...

  4. java代理(静态代理和jdk动态代理以及cglib代理)

    版权声明:本文为Fighter168原创文章,未经允许不得转载.   目录(?)[+]   说到代理,脑袋中浮现一大堆代理相关的名词,代理模式,静态代理,jdk代理,cglib代理等等. 记忆特别深刻 ...

  5. 看起来很唬人,然而却简单实用的CAP理论

    在做分布式系统开发时,经常会或多或少的听到CAP理论.或者是处理节点间数据一致性的问题.CAP理论很简单,但却是很多软件设计的宏观指导,因此也有人将之称为架构师必须掌握的理论之一.鉴于理论的东西相对来 ...

  6. 嵌入式Linux-Bmp转jpeg

    代码: /**************************************************************************** Ãû³Æ£º jpeg.c ¹ŠÄÜ ...

  7. maven中pom的结构介绍

    1.自己的坐标 groupId-->artifactId-->version> ` 2.打包方式 jar war pom packaging-->jar/war/pom 3. ...

  8. AOP的姿势之 简化混用 MemoryCache 和 DistributedCache 的方式

    0. 前言 之前写了几篇文章介绍了一些AOP的知识, 但是还没有亮出来AOP的姿势, 也许姿势漂亮一点, 大家会对AOP有点兴趣 内容大致会分为如下几篇:(毕竟人懒,一下子写完太累了,没有动力) AO ...

  9. HelloGitHub 月刊最受欢迎的开源项目 Top10(2020 年)

    作者:HelloGitHub-卤蛋 2020 年已成往事,2021 年悄然而至. 在已经过完的 2020 年里 HelloGitHub 共发布了 12 期月刊,推荐了 419 个开源项目.​每个月的 ...

  10. 初识分布式图数据库 Nebula Graph 2.0 Query Engine

    摘要:本文主要介绍 Query 层的整体结构,并通过一条 nGQL 语句来介绍其通过 Query 层的四个主要模块的流程. 一.概述 分布式图数据库 Nebula Graph 2.0 版本相比 1.0 ...