问题
很多时候我们电脑连上wifi之后就把密码忘记了,这个时候如果同事问自己密码是多少,如果作为程序员说不知道是不是感觉有点不好意思,哈哈……
解决
我使用的是windows电脑,就以windows为例说明下自己是如何查看的。
- 打开windows命令行。按下
windows + r
快捷键,然后输入cmd
回车就打开了 - 命令行输入
netsh wlan show profiles
可以看到电脑已经配置了wifi。效果如下
C:\Users\username>netsh wlan show profilesProfiles on interface WLAN:Group policy profiles (read only)
---------------------------------<None>User profiles
-------------All User Profile : test-5G
- 然后输入
netsh wlan show profiles name="profileName" key=clear
就可以看到密码了。效果如下。Security settings中的Key Content后面的内容就是密码
C:\Users\username>netsh wlan show profiles name="test-5G" key=clearProfile gc on interface WLAN:
=======================================================================Applied: All User ProfileProfile information
-------------------Version : 1Type : Wireless LANName : gcControl options :Connection mode : Connect automaticallyNetwork broadcast : Connect only if this network is broadcastingAutoSwitch : Do not switch to other networksMAC Randomization : DisabledConnectivity settings
---------------------Number of SSIDs : 1SSID name : "test-5G"Network type : InfrastructureRadio type : [ Any Radio Type ]Vendor extension : Not presentSecurity settings
-----------------Authentication : WPA2-PersonalCipher : CCMPAuthentication : WPA2-PersonalCipher : GCMPSecurity key : PresentKey Content : aa123456Cost settings
-------------Cost : UnrestrictedCongested : NoApproaching Data Limit : NoOver Data Limit : NoRoaming : NoCost Source : Default