8,367
edits
Changes
→Use the nmcli command to set a static IP address
<li><p>Then you can view the name of the network device through the '''nmcli con show''' command, as shown below</p>
<ol style="list-style-type: lower-alpha;">
<li><p>'''orangepi''' is the name of the WIFI network interface (the name > is not necessarily the same)</p></li>
<li><p>'''Wired connection 1''' is the name of the Ethernet interface</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''nmcli con show'''</p>
<p>NAME UUID TYPE DEVICE</p>
<p>'''orangepi''' cfc4f922-ae48-46f1-84e1-2f19e9ec5e2a wifi wlan0</p>
<p>'''Wired connection 1''' 9db058b7-7701-37b8-9411-efc2ae8bfa30 ethernet eth0</p>|}</li></ol>
</li>
<li><p>Then enter the following command, where</p>
<ol style="list-style-type: lower-alpha;">
<li><p>'''"Wired connection 1"''' means to set the static IP address of > the Ethernet port. If you need to set the static IP address of > the WIFI, please modify it to the corresponding name of the > WIFI network interface (you can get it through the '''nmcli con > show''' command)</p></li><li><p>'''ipv4.addresses''' is followed by the static IP address to be > set, which can be modified to the value you want to set</p></li>
<li><p>'''ipv4.gateway''' represents the address of the gateway</p>
<p>orangepi@orangepi:~$ '''sudo nmcli con mod "Wired connection 1" \<br />