Hi so i know i can set up a wifi network using nmcli in this way.

nmcli con add type wifi ifname uap0 mode ap con-name <WIFI_AP_NAME> ssid <WIFI_SSID>
nmcli con modify <WIFI_AP_NAME> 802-11-wireless-security.psk <WIFI_PASSWORD>

But if i now want to modify the password and ssid of the created wifi network how do i do that? i do not find the correct command in the documentation.. Can i just do this

sudo nmcli con down <WIFI_AP_NAME>
sudo nmcli con modify <WIFI_AP_NAME>  802-11-wireless-security.psk "$WIFI_PASSWORD"
sudo nmcli con modify <WIFI_AP_NAME>  ssid <WIFI_SSID>
sudo nmcli con up <WIFI_AP_NAME>
  • Does this help: unix.stackexchange.com/questions/316482/… Commented Feb 21, 2023 at 16:28
  • @KillianFortman thank you, for the password it does, but for the SSID, is this the standard procedure?
    – busssard
    Commented Feb 21, 2023 at 16:47
  • It seems like this would work using nmcli con mod <WIFI_AP_NAME> ssid <WIFI_SSID> if this works I will create an answer for any other people reading this question for an answer. As for standard process I am unsure, but I see no issues with putting the SSID in like this, only issues if you did the password without using the interactive since passwords in cleartext on command line dont mix well with security. Commented Feb 21, 2023 at 17:00

1 Answer 1


Just edit the NetworkManager connection file. (/etc/NetworkManager/system-connections/<connection_name>.nmconnection)

I use sed to do this on automated image-restore:

sed -i "s/<old_ssid>/<new_ssid>/g" /etc/NetworkManager/system-connections/<connection_name>.nmconnection

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .