1。利用SDFormatter格式化移動硬盤linux
2。利用Win32DiskImag將raspbian的iso鏡像文件安裝在移動硬盤中ubuntu
3。使用SSH將樹莓派與電腦相連網絡
在DOS界面輸入arp -a,獲取樹莓派的IP地址。利用PuTTY登陸命令窗口(電腦網絡須要打開共享)。ssh
2016年11月後版本有登陸拒絕,緣由是官方默認禁止SSH,只需在根目錄下創建ssh空白文本便可ide
用戶名:pi,初始密碼:raspberry(在ubuntu中帳號及密碼均爲ubuntu)ui
從新設置密碼:this
password pi
輸入兩次所想設置的密碼spa
4。更新apt命令行
sudo apt-get update
5。添加vnc server:code
sudo apt-get install tightvncserver
安裝vnc
tightvncserver
提示輸入VNC登陸密碼兩次並要求重複確認,好比設置爲pi123456。
sudo nano /etc/init.d/tightvncserver
輸入以下內容:(#符號後面的內容均爲註釋內容)
#!/bin/sh ### BEGIN INIT INFO # Provides: tightvncserver # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/stop tightvncserver #仍是爲(start/stop tightvncserver)? ### END INIT INFO # More details see: # http://www.penguintutor.com/linux/tightvnc ### Customize this entry # Set the USER variable to the name of the user to start tightvncserver under export USER='pi' ### End customization required eval cd ~$USER case "$1" in start) # 啓動命令行。此處自定義分辨率、控制檯號碼或其它參數。 su $USER -c '/usr/bin/tightvncserver -depth 16 -geometry 800x600 :1' echo "Starting TightVNC server for $USER " ;; stop) # 終止命令行。此處控制檯號碼與啓動一致。 su $USER -c '/usr/bin/tightvncserver -kill :1' echo "Tightvncserver stopped" ;; *) echo "Usage: /etc/init.d/tightvncserver {start|stop}" exit 1 ;; esac exit 0
sudo chmod 755 /etc/init.d/tightvncserver sudo update-rc.d tightvncserver defaults
ifconfig
sudo raspi-config
sudo nano /etc/modules
bcm2835-v4l2
sudo dpkg-reconfigure tzdata