环境:
WIN10_LTSC
树莓派3B+
Raspbian Stretch Lite
下载树莓派镜像(Raspbian Stretch Lite版本):
https://downloads.raspberrypi.org/raspbian_lite_latest
下载镜像烧录工具(win32diskimager):
http://sourceforge.net/projects/win32diskimager/files/Archive/win32diskimager-v0.9-binary.zip/download
开启SSH:
新建“SSH”文件(三字母无后缀空白文件),放入SD卡的BOOT分区
修改软件更新源(中科大):
sudo sh -c 'echo "deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi\ndeb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi" > /etc/apt/sources.list'
修改系统更新源(中科大):
sudo sh -c 'echo "deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui\ndeb-src http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui" > /etc/apt/sources.list.d/raspi.list'
同步更新源:
sudo apt-get update ; sudo apt-get upgrade ; sudo apt-get dist-upgrade
修改时区:
sudo apt-get install ntpdate
#网上有很多tzselect的步骤,这个命令并不能永久改变时区(重新登录失效),只是告诉你怎样去设置环境变量TZ,可用如下命令一样效果;
#设置时区
TZ='Asia/Shanghai'; export TZ;
#配置网络对时
sudo ntpdate cn.pool.ntp.org
#配置用户时区环境变量TZ
sudo echo -e "\nTZ='Asia/Shanghai'; export TZ" >> ~/.profile
#开机自动同步时间
sudo sh -c ' echo "\nsudo ntpdate cn.pool.ntp.org" >> /etc/rc.local'
#关闭Wifi、蓝牙
sudo sh -c ' echo "\ndtoverlay=pi3-disable-bt \ndtoverlay=pi3-disable-wifi" >> /boot/config.txt'