1. 程式人生 > >樹莓派系統安裝和遠端訪問

樹莓派系統安裝和遠端訪問

1.安裝樹莓派系統

 1.格式化SD卡        

  先用SDFormatter格式化SD卡,Drive是SD卡名,Size容量大小,直接點格式化快速格式化即可。

2. 燒錄系統 

登入樹莓派官網(https://www.raspberrypi.org/)下載系統映象,選一個自己喜歡的系統,下載後解壓出來得到.img檔案。  網上下載一個Win32DiskImager的工具,找到解壓好的.img檔案,點選write就可以寫入img映象到SD卡

2.ssh遠端連線樹莓派

看見筆記本有HDMI介面以為可以用筆記本當顯示器,插上去發現沒反應,查了一下才知道一般筆記本的HDMI只用於輸出不能當作輸入,沒有顯示屏與路由器,筆記本是網線連著校園網。

手機開熱點筆記本連,然後需要開啟【網路和共享中心】->【更改介面卡設定】-右鍵單擊【WLAN】->【屬性】->【共享】

【*】 2016-11官方釋出的Raspbian系統映象,系統預設禁用了 SSH 服務,在SD卡根目錄建立文字檔案重新命名為ssh並刪除字尾名,之後才能ssh訪問樹莓派 

SD卡插入樹莓派,插好充電器樹莓派自動啟動,網線一端接樹莓派一端接筆記本,win10開啟cmd,輸入arp -a

192.168.137.1是本機地址,動態的是樹莓派的 

使用ssh登入軟體putty,securecrt等。我用的是securecrt hostname填樹莓派ip地址,埠預設22,username pi 密碼 raspaberry

連線好以後改樹莓派配置

[email protected]:~$ sudo raspi-config 

 

 

 

 

 


                              ┌─────────────────────────────┤ Raspberry Pi Software Configuration Tool (raspi-config) 
                              │                                                                                                                      │
                              │                  1 Change User Password Change password for the default user (pi)                                    │
                              │                  2 Hostname             Set the visible name for this Pi on a network                                │
                              │                  3 Boot Options         Configure options for start-up                                               │
                              │                  4 Localisation Options Set up language and regional settings to match your location                 │
                              │                  5 Interfacing Options  Configure connections to peripherals                                         │
                              │                  6 Overclock            Configure overclocking for your Pi                                           │
                              │                  7 Advanced Options     Configure advanced settings                                                  │
                              │                  8 Update               Update this tool to the latest version                                       │
                              │                  9 About raspi-config   Information about this configuration tool                                    │
                              │                                                                                                                      │
                              │                                                                                                                      │
                              │                                                                                                                      │
                              │                                  <Select>                                  <Finish>                                  │
                              │                                                                                                                      │
                              └───────────────────────────────────────────────────────────

選擇 5後 enable ssh ,vnc                   
[email protected]:~$ sudo raspi-config 

 

選擇 7  然後  A1 Expand Filesystem Ensures that all of the SD card storage is available to the OS          

燒錄系統後看到SD卡容量很小,要使用這個選項來擴充套件檔案系統,將樹莓派的更分割槽擴充套件到整個SD卡

enable vnc後就可以用vnc工具連線樹莓派,輸入樹莓派地址 ,username pi , passwd raspberry

 就能訪問樹莓派圖形化介面了

 

參考:https://jingyan.baidu.com/article/4853e1e569d97c1908f72654.html