nmcli connection add type ethernet con-name 'home' ifname eth0 ipv4.method auto
Create a wired connection profile
This builds a new profile named home for the eth0 interface that obtains its address through DHCP, which is the ipv4.method auto setting. Nothing is activated until you run nmcli connection up 'home', and the profile persists across reboots. Replace auto with manual and add an address to make it static.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.