常用指令

查看网络ipa

arp -a

配置系统

sudo raspi-config 

使用USB摄像头

rapistill指令来截图

拓展:raspistill命令只能用于CSI摄像头。对于USB接口的摄像头,可以通过调用fswebcam进行访问。
在树莓派终端输入sudo apt-get install fswebcam安装fswebcam。通过输入sudo fswebcam image.jpg进行拍照测试。使用方法可以通过输入fswebcam -h查询。

sudo fswebcam /home/pi/pictures/image.jpg

修改配置清华源

https://mirrors.tuna.tsinghua.edu.cn/help/debian/

修改目录配置

sudo nano /etc/apt/sources.list

<2024.5.31>

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
sudo nano /etc/apt//sources.list.d/raspi.list

内容添加

deb http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ bookworm main
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 648ACFD622F3D138 0E98404D386FA1D9

更新

sudo apt-get update
sudo apt-get upgrade

网络问题

如果出现Tem的情况需要配置DNS

sudo nano /etc/resolv.conf

在ip地址后添加 8.8.8.8 .8.8.4.4
nameserver 114.114.114.114

保存文件并退出编辑器。然后,更新系统的DNS设置:

sudo systemctl restart systemd-resolved

树莓派安装conda错误原因

树莓派4B 64位系统属于aarch64,但是目前树莓派无法兼容miniconda3 4.10以上的版本

解决办法

安装Miniconda3-py38_4.9.2版本

开启conda临时命令

source ~/miniconda3/bin/activate

常用工具包

(需要先修改清华源后安装不容易出错)

sudo apt-get install build-essential cmake unzip pkg-config

连接方式(3种方式参考文档)

https://blog.csdn.net/weixin_41656968/article/details/80080171

网线/WIFI连接

先尝试使用<用户名>.local的ip进行连接 我的为wzq.local

使用vncserver查看连接的ip

image-20240605121725451

VNC显示进入失败

参考网址https://blog.csdn.net/qq_64777806/article/details/135445037

解决办法:

修改配置文件,找到有‘hdmi_force_hotplug=1 ’的一行,把前面的‘#’注释符号去掉

sudo nano /boot/config.txt

如果修改后出现系统奔溃,出现写入镜像,多尝试几次可能可以成功。

文章作者: KAKA
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 祺同学的日常笔记
指令集
喜欢就支持一下吧