1.Win32DiskImager 在U盘写入安装镜像
2.开启ssh登录 在内存卡里面创建 ssh 空文件
3.设置wifi连接
内存卡 创建 /boot/wpa_supplicant.conf
country=CN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="wifi_name"
psk="password"
key_mgmt=WPA-PSK
priority=1
}
树莓派通电后会自动添加到 /etc/wpa_supplicant/wpa_supplicant.conf
mount samba服务器到本地
sudo apt-get install smbclient
sudo apt-get install cifs-utils
查看服务器目录
smbclient -L 192.168.1.1
smbclient //192.168.1.1/path
命令行挂载
sudo mount -t cifs //192.168.1.1/path /home/user/path/ -o username=root,password=***
开机自动挂载路由器到linux
sudo vi /etc/fstab
添加:
//192.168.1.1/path /home/user/assets/ cifs defaults,username=root,password=***
设置环境支持中文
sudo raspi-config
设置时区
sudo dpkg-reconfigure tzdata
date
安装开机启动管理程序
sudo apt-get install sysv-rc-conf
更换阿里源
sudo vi /etc/apt/sources.list
sudo rm /etc/apt/sources.list.d/*
deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main non-free contrib rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ stretch main non-free contrib rpi
更新内核
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update