Raspberry Pi 3
  • Introduction
  • 初始化設定
  • raspi-config
    • Change User Password
    • Network Options
    • Boot Options
    • Localisation Options
    • Interfacing Options
    • Overclock
    • Advanced Options
    • Update
    • About raspi-config
  • 查詢Raspberry版本資訊
    • 無線網路設定
Powered by GitBook
On this page
  • N1 Hostname (Set the visible name for this Pi on a network)
  • N2 Wi-fi (Enter SSID and passphrase)
  • N3 Network interface names

Was this helpful?

  1. raspi-config

Network Options

PreviousChange User PasswordNextBoot Options

Last updated 6 years ago

Was this helpful?

此選項主要是修改網路設定,執行enter進入網路設定頁

N1 Hostname (Set the visible name for this Pi on a network)

執行enter後,會看到如下的注意訊息,說明hostname只能包含ASCII字母a~z(不區分大小寫),數字0~9,及連字符號-,但hostname的開始及結尾不可以為連字符號-,其他的符號都不能,空白符號也是不能的,那如果在此設定後,基本上會自動把符號拿掉,例如輸入「raspi a」,重開機後會變成「raspia」,如果輸入「raspi+a」,重開機後會變成「raspia」,會自動取消不符合的符號。

執行enter,關閉注意訊息後,就會出現如下的設定畫面,請在此設定此設備的hostname後,再次執行enter

修改前ssh連線指令如下

ssh pi@raspberrypi.local

修改前登入後顯示如下

pi@raspberrypi:~ $

修改後ssh連線指令如下

ssh pi@raspi.local

修改後登入後顯示如下

pi@raspi:~ $

N2 Wi-fi (Enter SSID and passphrase)

出現SSID設定畫面,請輸入要連線的SSID名稱,注意,目前Raspiberry Pi 3不支援5G的網路,所

N3 Network interface names

網路卡名稱,可以透過此設定切換不同的顯示方式,在N3 Network interface names執行enter

會出現如下的提問,是否要啟動predictable network interface names?就只有yes和no,如果選yed啟用,在網卡的名稱就會以mac address做顯示,如果選no則以舊有的eth0、eth1做顯示

如上圖是選yes,執行enter後就會出現如下的畫面,告知您是執行enabled,如果是選no,則會顯示disabled,確認後就執行enter,在離開時,如果設定有變動,會要求重新開機

重新開機後就可以使用「ifconfig」指令去看目前的網路卡名稱

Predictable network interface names are enabled,顯示的網路卡名稱為「enxb827ebe458c7」

pi@raspberrypi:~ $ ifconfig
enxb827ebe458c7: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:e4:58:c7  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Predictable network interface names are disabled,顯示的卡路卡名稱為「eth0」

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:e4:58:c7  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

此選項設定主機的hostname,系統預設值為「raspberrypi」,可執行enter進行設定

透過N2 Wi-fi可以設定要連接的無線網路,設定好後就可以透過無線網卡上網,請在此處執行enter,如下圖