Dear jheng-jhongwu,
You can manage the network configuration using systemd.
To stop using DHCP and define a static ip address:
1. Create a file under /lib/systemd/network folder named 10-eth0.network for example and define your desired configuration:
[Match]
Name=eth0
[Network]
Address=10.0.0.100/24
Gateway=10.0.0.1
2. Restart systemd-networkd service
root@imx8mqevk:~# systemctl restart systemd-networkd.service
3. Verify
root@imx8mqevk:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:9f:05:69:fc
inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::204:9fff:fe05:69fc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:1691402 errors:0 dropped:0 overruns:0 frame:0
TX packets:93052 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:192346556 (183.4 MiB) TX bytes:15991089 (15.2 MiB)
That's all
If this reply answers your question please mark it as "correct answer".
Regards
Maro