mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
完成翻译20161110 How To Update Wifi Network Password From Terminal In Arch Linux (#4733)
* translated * translated
This commit is contained in:
parent
2bacc6a82a
commit
c4554fff19
@ -1,107 +0,0 @@
|
||||
translating by chenzhijun
|
||||
How To Update Wifi Network Password From Terminal In Arch Linux
|
||||
============================================================
|
||||
![Update Wifi Network Password From Terminal In Arch Linux](https://www.ostechnix.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
|
||||
After changing the Wifi Network password in my 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. 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 perfect 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.
|
||||
|
||||
[
|
||||
![sksk_001](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_001-1.png)
|
||||
][2]
|
||||
|
||||
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'
|
||||
```
|
||||
|
||||
[
|
||||
![sksk_002](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_002-1.png)
|
||||
][3]
|
||||
|
||||
I don’t have much experience in 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
|
||||
```
|
||||
|
||||
[
|
||||
![sksk_003](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_003-1.png)
|
||||
][4]
|
||||
|
||||
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.
|
||||
|
||||
[
|
||||
![sksk_004](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_004-1.png)
|
||||
][5]
|
||||
|
||||
Enter a name for the profile.
|
||||
|
||||
[
|
||||
![sksk_005](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_005-1.png)
|
||||
][6]
|
||||
|
||||
Finally, Enter the security key to the network profile and hit ENTER key.
|
||||
|
||||
[
|
||||
![sksk_006](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_006-1.png)
|
||||
][7]
|
||||
|
||||
That’s it. Now, we have updated the password to 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.
|
||||
|
||||
If you find this guide useful, please share it on your social networks and support us.
|
||||
|
||||
Cheers!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/update-wifi-network-password-terminal-arch-linux/
|
||||
|
||||
作者:[ SK][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.ostechnix.com/author/sk/
|
||||
[1]:http://ostechnix.tradepub.com/free/w_pacb38/prgm.cgi?a=1
|
||||
[2]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_001-1.png
|
||||
[3]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_002-1.png
|
||||
[4]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_003-1.png
|
||||
[5]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_004-1.png
|
||||
[6]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_005-1.png
|
||||
[7]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_006-1.png
|
@ -0,0 +1,109 @@
|
||||
怎样在 Arch Linux 终端上更改 WiFi 密码
|
||||
============================================================
|
||||
|
||||
![Update Wifi Network Password From Terminal In Arch Linux](https://www.ostechnix.com/wp-content/plugins/lazy-load/images/1x1.trans.gif)
|
||||
|
||||
自从我修改了路由器的 WiFi 网络密码,我的 Arch Linux 测试机就不能连接到网络了。由于我的Arch Linux 测试机没有图形化桌面环境,因此我想在终端上更改 WiFi 密码。在图形化操作界面中,更改 WiFi 密码是很容易的。我仅仅需要打开网络管理器,之后就能很快更改 WiFi 网络密码。但是,我从来没有在 Arch Linux 终端上用命令行来更改 WiFi 密码。我开始在 google 上搜索相关资料,并且在 Arch Linux 论坛找到了一个好的解决办法。如果你也面临同样的问题,读完这篇文章吧,这个方法并没有那么难。
|
||||
|
||||
|
||||
### 在终端更改 WiFi 网络密码
|
||||
|
||||
修改了路由器的 WiFi 密码之后,我尝试在终端使用 _wifi-menu_ 命令来更新WiFi 密码,但是它一直报错。
|
||||
|
||||
```
|
||||
sudo wifi-menu
|
||||
```
|
||||
|
||||
它显示了可用的 WiFi 列表。
|
||||
[
|
||||
![sksk_001](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_001-1.png)
|
||||
][2]
|
||||
|
||||
我的 WiFi 网络名为 Murugs9376。我选中了我的 WiFi网络,然后在 OK 处按下回车(ENTER)。我以为会让我输入新的 WiFi 密码(或者它应该先问我是否密码已经更改),但是它显示的却是下面的错误。
|
||||
|
||||
```
|
||||
Interface 'wlp9s0' is controlled by netctl-auto
|
||||
WPA association/authentication failed for interface 'wlp9s0'
|
||||
```
|
||||
|
||||
[
|
||||
![sksk_002](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_002-1.png)
|
||||
][3]
|
||||
|
||||
在 Arch 基础发行版上,我没有太多的经验。因此我去了 Arch Linux 论坛希望能找到解决方法。感天谢地,之前有人发了同样问题的帖子并从一位 Arch 老司机那里得到了解决办法。
|
||||
|
||||
|
||||
网络相关的配置文件都是存放在 /etc/netctl/ 文件夹下。例如,下面是我的 Arch Linux 测试机上该文件夹下的内容:
|
||||
|
||||
```
|
||||
ls /etc/netctl/
|
||||
|
||||
Sample Output:
|
||||
|
||||
examples ostechnix 'wlp9s0-Chendhan Cell Service' wlp9s0-Pratheesh
|
||||
hooks wlp9s0 wlp9s0-Murugu9376
|
||||
interfaces wlp9s0-AndroidAP wlp9s0-none
|
||||
```
|
||||
|
||||
[
|
||||
![sksk_003](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_003-1.png)
|
||||
][4]
|
||||
|
||||
|
||||
我如果想要更改密码,只需要删除我的 WiFi 网络配置文件 (wlp9s0-Murugs9376) 并且重新运行_wifi-menu_ 命令。
|
||||
|
||||
因此,首先让我们用下面的命令来删除原来的 WiFi 配置文件:
|
||||
|
||||
```
|
||||
sudo rm /etc/netctl/wlp9s0-Murugu9376
|
||||
```
|
||||
|
||||
删除配置文件之后,运行 _wifi-menu_ 命令来更新 WiFi 密码。
|
||||
|
||||
```
|
||||
sudo wifi-menu
|
||||
```
|
||||
|
||||
选择 wifi-network 并且按回车键(ENTER)。
|
||||
|
||||
[
|
||||
![sksk_004](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_004-1.png)
|
||||
][5]
|
||||
|
||||
|
||||
为新配置文件输入一个新名字。
|
||||
[
|
||||
![sksk_005](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_005-1.png)
|
||||
][6]
|
||||
|
||||
最后,输入 WiFi 新密码到配置文件中,并且按下回车键(ENTER)。
|
||||
[
|
||||
![sksk_006](http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_006-1.png)
|
||||
][7]
|
||||
|
||||
|
||||
这样就完成了。现在,我们已经更新了我们的 WiFi 网络密码。像你所看到的一样,在 Arch Linux 终端里面更新 WiFi 密码并不是件很难的事情。任何人都能在几秒钟以内完成它。
|
||||
|
||||
|
||||
如果您觉得这个教程很有帮助,希望您能分享到您的社交网络中来支持我们。
|
||||
|
||||
谢谢!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/update-wifi-network-password-terminal-arch-linux/
|
||||
|
||||
作者:[ SK][a]
|
||||
译者:[chenzhijun](https://github.com/chenzhijun)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.ostechnix.com/author/sk/
|
||||
[1]:http://ostechnix.tradepub.com/free/w_pacb38/prgm.cgi?a=1
|
||||
[2]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_001-1.png
|
||||
[3]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_002-1.png
|
||||
[4]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_003-1.png
|
||||
[5]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_004-1.png
|
||||
[6]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_005-1.png
|
||||
[7]:http://www.ostechnix.com/wp-content/uploads/2016/11/sk@sk_006-1.png
|
Loading…
Reference in New Issue
Block a user