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.
Once you have NPM installed, install the wifi-password-cli module using:
npm install --global wifi-password-cli
Now that you have the module installed, use the following to see its usage:
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:
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:
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
I hope this will come in helpful ;)