Linux上初始化Raspberry Pi
小家伙挺别致的…
安装Raspbian OS
- 作为单板机,RPi的硬件组成比较固定,因此专门为其设计了操作系统Raspbian,可以看出命名时取了RPi的前缀和其父分支Debian的后缀
- RPi官网下载系统影像,解压
- 将MicroSD存储卡插入读卡器接入PC,找到对应的设备文件
- 将系统影像烧录进SD卡
1
| dd if=<OS影像> of=/dev/<SD卡> status=progress bs=4M conv=fsync
|
- 将SD卡插入RPi的卡槽
接线
- RPi的micro-HDMI口接入显示屏的HDMI口
- RPi的USB口接入显示屏的供电口
- RPi的GPIO口接入40P排线
- RPi的Type-C供电口接入电源适配器
- 如用有线网则把网线接入RPi的Ethernet口
SSH远程控制
- RPi启动后设置用户名密码和网络, 允许ssh密码登录
- PC访问192.168.0.1进入路由器后台获取RPi的ip地址
- ssh连接
VNC远程连接
- RPi设置窗口系统为
X11
- RPi允许vnc服务
1
| systemctl enable --now vncserver-x11-serviced
|
- PC上安装TigerVNC客户端
1
| sudo pacman -Syu tigervnc
|
- 启动TigerVNC输入ip进行连接
更新软件
1 2
| sudo apt update sudo apt dist-upgrade --fix-missing -y
|
更新固件
展示
$shields-style-height = 22px
.footer {
padding 1rem 0
color var(--text-color-4)
font-size 1rem
a {
color var(--text-color-4)
&:hover {
color var(--primary-color)
}
&.no-pointer {
pointer-events none
}
}
.website-info-box {
display flex
flex-direction column
align-items center
justify-content center
&.shields {
padding 0 1rem
img {
height $shields-style-height !important
}
a {
position relative
display inline-flex
box-sizing border-box
text-decoration none
}
.shields-item
.count-box {
margin 0.3rem 0.2rem
user-select none
}
}
+keep-mobile() {
&.shields {
.shields-item
.count-box {
margin 0.12rem -0.3rem
transform scale(0.9)
transform-origin center center
}
}
}
.info-item {
position relative
display flex
flex-wrap wrap
align-items center
justify-content center
box-sizing border-box
color var(--text-color-4)
&.shields {
.count-box {
display flex
justify-content flex-start
height $shields-style-height
color #f2f2f2
font-size 12.6px
.item-type
.item-value {
display flex
align-items center
height 100%
padding 0 6px
}
.item-type {
margin-right 0
background #555555
}
.item-value {
&.uv {
background coral
}
&.pv {
background orange
}
&.word {
background indianred
}
}
}
}
&.default {
margin 0.2rem 0
.count-box {
margin-right 15px
&::before {
position absolute
top 50%
left -10px
box-sizing border-box
transform translateY(-55%)
content '|'
}
&:first-child {
&::before {
display none
}
}
&:last-child {
margin-right 0
}
.item-type {
margin-right 4px
}
}
}
&.count-item {
display flex
.count-box {
&.uv
&.pv {
display none
}
}
}
&.deploy-info {
display flex
a
.tooltip {
display flex
align-items center
}
img {
height 1.08rem
margin 0 0.4rem
}
}
}
}
.icon-animate {
animation heartbeat-animate 1.2s ease-in-out infinite
}
}