【树莓派烧录-环境配置一条龙】

1 SD Card Formatter

格式化sd卡,一般格式化为FAT

SD Card Formatter
百度云里面也有

2 清华ubuntu镜像源

清华ubuntu镜像源

在这里插入图片描述

3 树莓派烧录器

树莓派烧录器下载

4 烧录

5 连接wifi

sudo nano /etc/netplan/50-cloud-init.yaml

sudo netplay apply

6 更换源地址

为了安装后面的桌面

sudo vim /etc/apt/sources.list
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

7更新

sudo apt-get update

sudo apt-get upgrade

8 安装轻量级桌面

进入命令行

Ctrl + Alt + F1一直到Ctrl + Alt + F7
sudo apt install xubuntu-desktop

选择lightdm

9 交换空间

查看系统是否有交换分区

sudo swapon --show

然后你会发现根本没有提示,那么就是没有交换空间,你也可以用free -h来查看一下: 

free -h
检查磁盘的使用情况 

df -h
创建交换分区 

sudo fallocate -l 10G /swapfile

更改权限 
ls -lh /swapfile
sudo chmod 600 /swapfile
标记交换文件

sudo mkswap /swapfile
启动交换文件

sudo swapon /swapfile  #打开交换空间

#sudo swapoff /swapfile 关闭交换空间
查看

sudo swapon --show
free -h
永久保存

sudo cp /etc/fstab /etc/fstab.bak  #备份系统文件
 
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

10 树莓派安装no machine

no machine

选择arm64版本
在这里插入图片描述
在这里插入图片描述

11 启动eth0

sudo ifconfig eth0 up

12 启动wifi

问题原因:在烧录镜像的过程中,配置了wifi导致

#输入如下命令
cd /etc/netplan/

sudo vim 50-cloud-init.yaml
  1. 将network:{config:disabled} 取消注释

  2. disabled 改为 able

  3. 将network及后面的代码注释掉
    在这里插入图片描述

13 树莓派发出热点

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值