Did you ever forget your WiFi password? Or did you ever have guests over and needed an easy way to share your WiFi?
Well in this mini-tutorial, I'll show how you can easily find your WiFi password and share it with others through a QR code using a command-line tool.
Installing the Tool
The tool that is going to allow you to do this needs to be installed through NPM so make sure you have NPM installed. You can use this guide for installing NPM.
Once you have NPM installed, install the wifi-password-cli module using:
npm install --global wifi-password-cli
Using the Tool
Now that you have the module installed, use the following to see its usage:
wifi-password --help
You will see the following output:
usage: wifi-password [options]
optional arguments:
-h, --help show this help message and exit
--show-qr, -show Show a ASCII QR code onto the terminal/console
--save-qr [PATH], -save [PATH]
Create the QR code and save it as an image
--ssid SSID, -s SSID Specify a SSID that you have previously connected to
--version Show version number
You can simply display your WiFi password through the terminal using:
wifi-password
This will prompt you with a security sudo user confirmation window:
I have a macOS, but you will see a different prompt depending on your OS. Enter the required information and your WiFi password will be displayed in terminal!
You can use the following command to generate and display a QR code of your WiFi password for guests to scan:
wifi-password --show-qr
You can save this QR code as an image using the following command:
wifi-password --save-qr [PATH]
You can choose where to save the image by varying the path argument at the end, for example:
wifi-password --save-qr /usr/local/images
Conclusion
I hope this will come in helpful ;)
Top comments (0)