Home Arch Linux How To Update Wifi Network Password From Terminal In Arch Linux

How To Update Wifi Network Password From Terminal In Arch Linux

By sk
Published: Last Updated on 3.8K views

After changing the Wifi Network password in the Router, My Arch Linux test machine lost the Internet connection. So I wanted to update the new password from Terminal because my Arch Linux test box doesn't have graphical desktop environment yet. Changing old wifi password to new password is pretty easy in GUI mode. I will simply open the network manager and update the new password to the wifi in few seconds. However, I am not aware of updating the wifi network password from command line in Arch Linux. So, I started to dig into Google and find a working solution from the Arch Linux forum. In case you ever been in the same situation, read on. It's not that difficult.

Update Wifi Network Password From Terminal

After changing the password in Router, I ran wifi-menu command to update the new password. But It kept throwing the following error.

$ sudo wifi-menu

It displayed the list of available wifi networks.

Choose Wireless Network

Choose Wireless Network

My wifi network name is Murugs9376. Then, I selected my network and hit OK button. Instead of asking the new password (I thought it was going to ask me if the password has been changed.), It showed the following error.

Interface 'wlp9s0' is controlled by netctl-auto
WPA association/authentication failed for interface 'wlp9s0'
Error - WPA association/authentication failed

Error - WPA association/authentication failed

At the time of this error happened, I didn't have much experience with Arch based distributions. So I went thorough the Arch linux forum hoping for the solution. Thankfully, someone has posted the same problem and got the workaround from one of the fellow Arch user. Following is the solution to update the wifi network password from Terminal in Arch based distributions.

The network profiles is stored in the /etc/netctl/ folder. For example, here is my Arch Linux test box wifi network profile details.

$ ls /etc/netctl/

Sample Output:

examples    ostechnix         'wlp9s0-Chendhan Cell Service'  wlp9s0-Pratheesh
hooks       wlp9s0            wlp9s0-Murugu9376
interfaces  wlp9s0-AndroidAP  wlp9s0-none
List wifi network profiles

List wifi network profiles

All I need to update the new password is to delete the my wifi network profile (Ex. wlp9s0-Murugs9376) and re-run the wifi-menu command to new password.

So, first let us delete the wifi profile using command:

$ sudo rm /etc/netctl/wlp9s0-Murugu9376

After deleting the profile, run wifi-menu command to update the new password.

$ sudo wifi-menu

Select the wifi-network and press ENTER.

Select the wifi-network

Select the wifi-network

Enter a name for the profile.

Enter wifi network profile name

Enter wifi network profile name

Finally, Enter the security key to the network profile and hit ENTER key.

Enter security key for wifi network profile

Enter security key for wifi network profile

That's it. Now, we have updated the password of the wifi network. As you can see, updating password from Terminal in Arch Linux is no big deal. Anyone could do it in a matter of seconds.


Related read:


You May Also Like

1 comment

Suv January 13, 2020 - 9:47 am

Another more straight-forward solution is to EDIT the wifi profile and change ‘Key=OLDPASSWORD’ to Key=’NEWPASSWORD’

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More