Skip to content
  • Jiří Klimeš's avatar
    cli: 'connection add' command for adding NM connections non-interactively · 39012810
    Jiří Klimeš authored
    A few examples:
    nmcli --ask connection add
    nmcli connection add type ethernet
    nmcli -p connection add type ethernet con-name "my ethernet connection 1"
    nmcli connection add type ethernet ip4 192.168.100.5/24
    nmcli connection add type ethernet ip4 192.168.100.100/24 gw4 192.168.100.1 ip4 1.2.3.4 ip6 abbe::cafe
    nmcli connection add type ethernet ifname eth0
    nmcli connection add type ethernet autoconnect no ifname eth0
    nmcli connection add type wifi con-name Rakosnicek ssid Brcalnik
    nmcli --ask connection add type wifi con-name My_WiFi
    nmcli c a type infiniband con-name Infi1 transport-mode connected
    nmcli c a type bluetooth addr 12:54:00:fd:db:26
    nmcli c a type bluetooth addr 12:54:00:fd:db:26 bt-type dun-cdma
    nmcli c a type gsm apn internet
    nmcli c a type cdma
    nmcli c a type bond
    nmcli c a type bond ifname mybond0 mode active-backup
    nmcli c a ifname maxipes-fik type vlan dev eth0 id 55
    nmcli c a con-name VLAN1 type vlan dev eth0 id 44 ingress "2:4,3:55" egress "1:3" flags 6
    nmcli c a type bridge ifname br0 stp on ip4 10.0.0.25
    nmcli c a ifname eth0 type bridge-slave master 30fc816a-e7dd-4ae7-a86e-ab0c9cee51c2 hairpin no path-cost 333 priority 20
    nmcli c a type bridge-slave master br2
    39012810