# Network Options

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

![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-Ldydeh_I-GhlZZkNTRc%2FraspiConfig-2.png?generation=1556903023550033\&alt=media)

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

此選項設定主機的hostname，系統預設值為「raspberrypi」，可執行enter進行設定\
![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-LdydehbQZyr_ZuEUdkw%2FraspiConfig-2-N1.png?generation=1556903023180729\&alt=media)

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

![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-LdydehdGNIJ81KZFzFl%2FraspiConfig-2-N1_2.png?generation=1556903023503530\&alt=media)

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

![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-LdydehfhDVg3DRADpf6%2FraspiConfig-2-N1_3.png?generation=1556903023488238\&alt=media)

修改前ssh連線指令如下

```
ssh pi@raspberrypi.local
```

修改前登入後顯示如下

```
pi@raspberrypi:~ $
```

修改後ssh連線指令如下

```
ssh pi@raspi.local
```

修改後登入後顯示如下

```
pi@raspi:~ $
```

## N2 Wi-fi (Enter SSID and passphrase)

透過N2 Wi-fi可以設定要連接的無線網路，設定好後就可以透過無線網卡上網，請在此處執行enter，如下圖![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-LdydehhVMx76GORwA-z%2FraspiConfig-2-N2.png?generation=1556903024288968\&alt=media)

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

![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-LdydehjZbz31MLNXjhA%2FraspiConfig-2-N2_2.png?generation=1556903023996883\&alt=media)

![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-Ldydehlt2bBjE8uqZ8X%2FraspiConfig-2-N2_3.png?generation=1556903023847118\&alt=media)

## N3 Network interface names

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

![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-LdydehnnMd5SYN6ABxG%2FraspiConfig-2-N3.png?generation=1556903023901547\&alt=media)

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

![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-Ldydehpx0G8UlWJtvQc%2FraspiConfig-2-N3_2.png?generation=1556903028170114\&alt=media)

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

![](https://1812161165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdydZPxjDcJnzcr9z_R%2F-LdydaRScqPPmeYs1eIz%2F-LdydehrBZ7DjrQbN0h5%2FraspiConfig-2-N3_3.png?generation=1556903028676299\&alt=media)

重新開機後就可以使用「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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gxiangco.gitbook.io/raspberry-pi-3/chapter3/raspi-config-2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
