--- # title: Raspberry Pi_ Note (Raspbian) tags: Raspberry Pi, Raspberry Pi OS, Raspbian --- # Raspberry Pi_ Note <font color="#DE4E1B">(</font>Raspbian) ![](https://i.imgur.com/Oqzc54g.jpg =100%x) [TOC] ## Install Raspberry Pi OS & Remote Desktop * <strong>新安裝樹莓派系統<font color="#FF8080">不接螢幕</font> <font color="#DE4E1B">(Raspberry Pi OS (Raspbian))</font>:</strong> 1. **安裝樹莓派作業系統** * 下載樹莓派系統映像檔 [**Download Raspberry Pi OS**](https://www.raspberrypi.org/software/operating-systems/) * 將映像檔燒入至樹莓派開機SD卡 2. **Wi-Fi 連接樹莓派** * 把燒好的莓派開機SD卡插至個人電腦的讀卡機,在 **boot** 路徑新增檔案 **wpa_supplicant.conf** 內容為Wi-Fi相關設定,範例如下: <br> ```bash= 𝚌𝚘𝚞𝚗𝚝𝚛𝚢=𝚃𝚆 𝚌𝚝𝚛𝚕_𝚒𝚗𝚝𝚎𝚛𝚏𝚊𝚌𝚎=𝙳𝙸𝚁=/𝚟𝚊𝚛/𝚛𝚞𝚗/𝚠𝚙𝚊_𝚜𝚞𝚙𝚙𝚕𝚒𝚌𝚊𝚗𝚝 𝙶𝚁𝙾𝚄𝙿=𝚗𝚎𝚝𝚍𝚎𝚟 𝚞𝚙𝚍𝚊𝚝𝚎_𝚌𝚘𝚗𝚏𝚒𝚐=𝟷 𝚗𝚎𝚝𝚠𝚘𝚛𝚔={ 𝚜𝚜𝚒𝚍="𝙽𝙴𝚃𝙶𝙴𝙰𝚁𝟼𝟸" 𝚙𝚜𝚔="𝚋𝚛𝚊𝚟𝚎𝚘𝚋𝚘𝚎𝟷𝟸𝟷" 𝚔𝚎𝚢_𝚖𝚐𝚖𝚝=𝚆𝙿𝙰-𝙿𝚂𝙺 𝚜𝚌𝚊𝚗_𝚜𝚜𝚒𝚍=𝟷 𝚙𝚛𝚒𝚘𝚛𝚒𝚝𝚢=𝟷𝟶 } 𝚗𝚎𝚝𝚠𝚘𝚛𝚔={ 𝚜𝚜𝚒𝚍="𝙴𝟺𝟶𝟾𝙰𝟷" 𝚙𝚜𝚔="𝟽𝟹𝟺𝟸𝟽𝟹𝟺𝟸" 𝚔𝚎𝚢_𝚖𝚐𝚖𝚝=𝚆𝙿𝙰-𝙿𝚂𝙺 𝚜𝚌𝚊𝚗_𝚜𝚜𝚒𝚍=𝟷 } 𝚗𝚎𝚝𝚠𝚘𝚛𝚔={ 𝚜𝚜𝚒𝚍="𝙴𝟼𝟶𝟾" 𝚔𝚎𝚢_𝚖𝚐𝚖𝚝=𝚆𝙿𝙰-𝙿𝚂𝙺 𝚜𝚌𝚊𝚗_𝚜𝚜𝚒𝚍=𝟷 } ``` * 內容主要為Wi-Fi網路的 **SSID**、**密碼**、**加密方式** **scan_ssid=1** # ⇒ 如果SSID沒有被廣播就要加上 **priority= 【整數】** # ⇒ 整數值越大越優先連線,若數值相等或無設定優先序則自動連線訊號較強的網路。 ⨳更詳盡的內容設置請見:[**WPA_supplicant的設定方式** ](http://bigpxuan.blogspot.com/2016/12/wpasupplicant.html) <br> 3. **啟用SSH** 在 **boot** 路徑新增名為 **ssh** 的無副檔名空白檔案 ![](https://i.imgur.com/wIavWyF.png) (重要提醒: 在Windows的檔案總管需勾選檢是選項中的顯示附檔名設定才能刪除不需要的副檔名) * 設定完成後,將樹莓派開機SD卡退出個人電腦並在樹莓派**未通電**狀態下插入SD卡槽,插好SD卡後將樹莓派接上電源,等一會兒,見提供網路的AP、分享網路的裝置或 **IP Scanner** 相關軟體等網路連接狀態訊息顯示該樹莓派的相關已連線資訊則表示樹莓派成功連網,接著以 **SSH** 連接樹莓派及能進入樹莓派終端機使用樹莓派。 <br> 4. **Windows遠端桌面(Xrdp)** 於終端機輸入: **`sudo apt install xrdp`** --- ## Change host name * [<strong>如何更改Linux作業系統的主機名稱(hostname)?</strong> <font color=000000></font>](https://magiclen.org/linux-change-hostname/) **Legal characters in hostnames:** Domain names can contain almost any characters. However, host names and mail domain names have restrictions which only allow the use of characters '`a-z`', '`A-Z`', '`0-9`', and '`-`' (dash or minus sign). The '`/`' and '`_`' (divide or slash and underscore) characters are not legal. Note that hostnames include the owners of A and MX records and .in-addr.arpa PTR records, and the data fields of MX and .in-addr.arpa PTR records: in other words, almost all currently used DNS entries! The current releases of the BIND name server software enforce these restrictions. 20-Nov-1997, 10-Apr-1996 ## Relevant Note * [Linux Note](https://hackmd.io/@W_IwEzMdQa2Bn5h3f5cvTA/Syy6zMgcD)