Using nmcli to set a static IPV4 address使用nmcli设置静态IPv4地址
nmcli> set ipv4.addresses 192.168.100.10/24
Do you also want to set 'ipv4.method' to 'manual'? [yes]: yes
or
Be connected to the HA CLI, you should see an ha> prompt
Run ‘login’, you should now see a # prompt
Run ‘nmcli connection show’ to see your list of connections and choose which one you intend to edit. In my install there was only one listed, “HassOS default”
Run ‘nmcli con edit “HassOS default”’ (or whatever your connection is), you should now have an nmcli> prompt
Once in the nmcli prompt, run these commands filling in whatever your network details are:
nmcli> set ipv4.addresses 192.168.1.10/24
Do you also want to set ‘ipv4.method’ to ‘manual’? [yes]: yes
nmcli> set ipv4.dns 1.1.1.1
nmcli> set ipv4.gateway 192.168.1.1
nmcli> save
nmcli> quit
Exit the login prompt (run ‘exit’)
At the ha> prompt, run ‘ho reboot’
官方文档:https://github.com/home-assistant/operating-system/blob/dev/Documentation/network.md
https://community.home-assistant.io/t/how-to-change-ip-adresse-in-cli/332205/22?u=mslyhttps://blog.csdn.net/gongchenyu/article/details/134675480