配置系统
连接树莓派:
①有显示器的可以直接连接显示器
②没有显示器可以先在下载一个putty工具,然后将树莓派插上网线,输入ip地址,连接到树莓派终端
③树莓派的初始用户名:pi,密码:raspberry
④创建超级用户:sudo passwd root
配置:
①修改更新源
- cd /etc/apt
- sudo mv sources.list sources.list.bak
- sudo vi sources.list
进入到编辑界面,先复制源地址(百度),然后在编辑界面按i,然后在哪一行按右键,再按Esc,再按o换行,再复制另一个源地址,再按右键(PS:不熟悉vi编辑
)
学校提供的源:
- deb http://raspbian.mirrors.dglinux.com/raspbian/ wheezy main non-free contrib
- deb-src http://raspbian.mirrors.dglinux.com/raspbian/ wheezy main non-free contrib
一些国内源:
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
更新一下缓存
- sudo apt-get update 更新源
- sudo apt-get upgrade 更新软件
②安装远程工具
- sudo apt-get install xrdp
至此,可以利用windows的远程连接工具远程登陆树莓派
③设置
sudo raspi-config

第一项扩展sd卡容量,不行则参考http://bbs.ickey.cn/group-topic-id-35428.html
识别其余空间df -h
cat /sys/block/mmcblk0/mmcblk0p2/start
fdisk /dev/mmcblk0
d
2
n
p
2
122880
回车
w
reboot
resize2fs /dev/mmcblk0p2
第四项设置时区,选择后再选择第二项,选择Asia,选择Shanghai


浙公网安备 33010602011771号