How to change IP address in CLI

Really?

but the steps below will show you how to set it with nmcli :

nmcli connection show to list your connections

nmcli con show "Your Connection Name" to list the current properties of that connection

nmcli con edit "Your Connection Name" to enter edit mode for that connection

nmcli> print ipv4 will show you the ipv4 properties of that connection

To add your static IP address (select ‘yes’ for manual method);

Copy to clipboard

nmcli> set ipv4.addresses 192.168.1.10/24
Do you also want to set 'ipv4.method' to 'manual'? [yes]:

If you like, you can also edit set the dns server and local gateway while you’re here. This is important to do if you are making use of the Adguard add-on:

Copy to clipboard

nmcli> set ipv4.dns 1.1.1.1
nmcli> set ipv4.gateway 192.168.1.1
nmcli> save
nmcli> quit

Finally, you should follow this with a full reboot using

hassio ho reboot

14 Likes