Raspberry PI 常用设置
开机logo
/boot/cmdline.txt
最后加上 loglevel=3
ssh登陆和欢迎信息控制
/etc/issue和/etc/motd
WIFI
sudo tee /etc/network/interfaces <<-'EOF'
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
EOF
sudo tee /etc/wpa_supplicant/wpa_supplicant.conf <<-'EOF'
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="MX2017"
psk="**********"
key_mgmt=WPA-PSK
priority=1
}
EOF
换阿里源
sudo sh -c 'echo "deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main contrib non-free rpi" > /etc/apt/sources.list'
禁止屏幕在 Console 终端下休眠
setterm -blank 0 -powerdown 0
chromium-browser
#!/bin/bash
export DISPLAY=:0.0
/usr/bin/chromium-browser --noerrdialogs --kiosk --incognito "http://www.zhangmingxin.cn/raspberry.html"
无需键盘网络的开机配置
刷好系统后编辑config.txt文件,在最后一行下,另起一行添加
dtoverlay=dwc2
打开cmdline.txt文件 找到单词rootwait,在其之后添加
modules-load=dwc2,g_ether
开启SHH
添加一个文件名为ssh到根目录下,内容为空
pip替换国内源
永久替换 修改 ~/.pip/pip.conf 内容如下:
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
零时替换
pip install 需要安装的包名 -i https://mirrors.aliyun.com/pypi/simple/
禁用IPV6
/etc/sysctl.conf 添加
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.[interface].disable_ipv6 = 1
sysctl -p /etc/sysctl.conf
ADB
sudo apt-get install -y android-tools-adb
开机挂载Samba
//10.1.2.1/nas /mnt/nas cifs username=XXX,password=XXX,vers=1.0 0 0