Original post : https://unix.stackexchange.com/a/310699
nmcli con add type wifi ifname wlp2s0 con-name gustavo-eadbox autoconnect yes ssid gustavo-eadbox
nmcli con modify gustavo-eadbox 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify gustavo-eadbox wifi-sec.key-mgmt wpa-psk
nmcli con modify gustavo-eadbox wifi-sec.psk "gustavo-eadbox"