烧写系统
使用SDFormatter软件进行格式化。然后使用Win32DiskImager软件烧写系统镜像
WiFi连接
读卡器写好系统以后,打开读卡器
创建一个名字是ssh的文件,无后缀名并且什么内容都不写
新建文件,文件名为wpa_supplicant.conf
写入
country=CN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="" #无线名
psk="" #密码
key_mgmt=WPA-PSK
priority=1
}
putty登录树莓派
获取树莓派ip地址后,通过putty登录树莓派,默认用户名pi,密码raspberry。
将系统扩展到整个SD卡,使系统资源利用率更高
输入命令sudo raspi-config,选择Advanced Option,选择Expand Filesystem选项。重启之后生效。
更新软件源:
https://blog.youkuaiyun.com/shu_rin/article/details/82762816
https://blog.youkuaiyun.com/qq_35586327/article/details/94597760
更新软件源,可选:
中科大deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
清华deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
大连东软deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
重庆大学deb http://mirrors.cqu.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
浙江大学deb http://mirrors.zju.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
阿里云deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
使用指令sudo vi /etc/apt/sources.list使用vi命令编辑sources.list更改软件源
执行命令sudo apt-get update进行更新。
登录图形界面
安装VNC,sudo apt-get install tightvncserver,执行命令 tightvncserver来开启vnc服务。注意记录此时界面显示的‘X’的值
PC端下载VNC Viewer,输入ip地址以及端口号即可连接。(IP::端口值。其中IP就是我们用的树莓派的IP地址,端口值就是5900+‘X’)
1.VNC Server这一栏填写树莓派ip地址。
2.Username和Password指的是你登陆树莓派的用户名和密码,如果你没有对树莓派进行用户配置,用户名为pi,密码为raspberry。
添加完成后,VNC窗体中就会出现新的连接图标,双击即可远程登陆你的树莓派。
若vnc viewer上显示黑屏“cannot currently show the desktop”,则需调整分辨率
sudo raspi-config选择Advanced Options,选择Resolution,可选除第一项以外的分辨率,确认并重启。
sudo raspi-config选择Interfacing Options,选择VNC回车确认之后树莓派每次开机,VNC Server都会自启动,确保可以随时远程登陆树莓派。
安装python环境
https://www.cnblogs.com/gghy/p/11874138.html
https://blog.youkuaiyun.com/u013042928/article/details/86487579
其他
指令sudo raspi-config进入系统配置界面选项说明
(1)Expand Filesystem 确保整个TF卡的空间对操作系统是可以利用的, 建议选中
(2)Change User Password 改变默认pi用户的密码
(3)Boot Options 引导选项,进入桌面环境还是命令行
(4)Internationalisation Options 国际化选项,可以更改默认语言
change Locale 语言和区域设置
change timezone 设置时区
change keyboard Layout 改变键盘布局
(5)Enable Camera 使能树莓派摄像头
(6)Over Clock 超频,树莓派3不支持该功能
(7)Advanced Options 高级设置
over scan 是否让屏幕内容全屏显示
host name 在网上邻居或路由器中看到的主机名称
memory split 内存分配,选择给GPU多少内存
spi 是否默认启动Spi(串行外设接口)
audio 选择声音默认输出到模拟口还是HDMI口
重启命令:sudo reboot
树莓派关机命令:
1.终端输入命令:sudo shutdown -h now,此时系统立刻关机。
2.使用init或者是power关机:sudo init 0