<h3>Introduction</h3><p>When you first logged in to your WiFi network using your Linux computer you probably allowed it to save the password so that you didn&#39;t need to enter it again.</p><p>Imagine you got a new device such as a phone or games console that also needed to <a href="https://www.lifewire.com/internet-using-linux-command-line-4045263" data-component="link" data-source="inlineLink" data-type="internalLink" data-ordinal="1">connect to the wireless network</a>.</p><p>You could go hunting for the router and if you are lucky the security key is still listed on the sticker at the bottom of it. </p><p>It is actually easier just to log in to your computer and follow this guide. </p><h3>Find The WiFi Password Using The Desktop</h3><p>If you are using the GNOME, XFCE, Unity or Cinnamon desktop environments then the tool used for connecting to the internet is probably called network manager.</p><p>For this example I am using the <a href="https://www.lifewire.com/customize-xfce-desktop-environment-2202080" data-component="link" data-source="inlineLink" data-type="internalLink" data-ordinal="2">XFCE desktop environment</a>.</p><ul><li>Click on the network icon in the panel and click on &#34;Edit Connections&#34;.</li><li>Find the WiFi connection you wish to find the password for and click on &#34;Edit&#34;. </li><li>Click on the tab called WiFi Security.</li><li>The password will be shown as a list of asterisks. You can show the actual password by clicking the &#34;Show Password&#34; checkbox.</li></ul><h3>Find The WiFi Password Using The Command Line</h3><p>You can usually find the WiFi password via the command line by following these steps:</p><ul><li><a href="https://www.lifewire.com/ways-to-open-a-terminal-console-window-using-ubuntu-4075024" data-component="link" data-source="inlineLink" data-type="internalLink" data-ordinal="3">Open a terminal window</a></li><li>Type the following command to navigate to the folder where the connections are stored:<br/><br/><code>cd /etc/NetworkManager/system-connections</code><br/> </li><li>Type the following <a href="https://www.lifewire.com/uses-of-linux-ls-command-4054227" data-component="link" data-source="inlineLink" data-type="internalLink" data-ordinal="4">ls command</a> to get a list of networks<br/><br/><code>ls</code><br/> </li><li>Type the following <a href="https://www.lifewire.com/uses-of-linux-cat-command-4011235" data-component="link" data-source="inlineLink" data-type="internalLink" data-ordinal="5">cat command</a> to list the file to the terminal window:<br/><br/><code>sudo cat &lt;nameofwifi&gt;</code></li></ul><p>Look for the section called [wifi-security]. The password is usually prefixed by &#34;psk&#61;&#34;.</p><h3>What If I Am Using wicd To Connect To The Internet</h3><p>Not every distribution uses Network Manager to connect to the internet although most modern distributions do.</p><p>Older and lightweight distributions sometimes use wicd. </p><p>Follow these instructions to find the passwords for networks stored using wicd.</p><ul><li>Open a terminal window</li><li>Type the following command to navigate to the folder where the connections are stored<br/><br/><code>cd /etc/wicd</code><br/> </li><li>Open the wireless settings file:<br/><br/><code>sudo cat wireless-settings.conf</code></li></ul><p>The passwords for the WiFi networks are stored in this file.</p><h3>Other Places To Try</h3><p>In the past people used to use wpa_supplicant to connect to the internet. </p><p>If this is the case use the following command to locate the wpa_supplicant.conf file:</p><p><code>sudo locate wpa_supplicant.conf</code></p><p>Use the cat command to open the file and search for the password to the network you are connecting to.</p><h3>Use The Router Settings Page</h3><p>Most routers have their own settings page. You can use the settings page to show the password or if in doubt change it.</p><ul><li>Connect to the network you wish to show the password for</li><li>Open a web browser and type 192.168.1.1</li><li>You will normally see an option called settings or a login option</li><li>Log in to the admin page. (Unless you have changed the password a lot of routers have the user and password set to admin and admin which you should change by the way at the first opportunity).</li><li>You are now looking for the page in the settings screens that show details about the WiFI and in particular the password. Quite often there will be a password masked by asterisks with a show password checkbox next to it.</li></ul><h3>Security</h3><p>This guide doesn&#39;t show you how to hack WiFi passwords, instead it shows you the passwords that you have already entered previously.</p><p>Now you might think it is insecure to be able to show the passwords so easily. They are stored as plain text in your file system.</p><p>The truth is though that you have to enter your root password in order to see the passwords in network manager and you have to use the root password to open the file in the terminal.</p><p>If somebody doesn&#39;t have access to your root password then they won&#39;t have access to the passwords.</p><h3>Summary</h3><p>This guide has shown you quick and efficient ways to recover the WiFi passwords for your stored network connections.</p>