How to setup a static ip for the Raspberry Pi
井民全, jing, mqjing@gmail.com
1. Quick
vi /etc/dhcpcd.conf
ifdown wlan0 && ifup wlan0
2. Procedure
Step 1: Check your router ip and the device
Command
ip r
Step 2: Setup static ip
If you want to setup a static ip as 192.168.1.200, edit the dhcpcd.conf.
File: /etc/dhcpcd.conf
ifdown wlan0 && ifup wlan0
3. Verification
Scan the network.
Command
sudo arp-scan -I ens33 --localnet
Result
You can find the raspberry Pi ip was assigned to 192.168.1.200. Where 192.168.1.108 is my another Pi.