- Install qrencode
brew install qrencode - Make the QR code picture
qrencode -o qr.png -s 10 "https://example.com"-s 10 makes each square 10 pixels, big enough to print. Use a bigger number for posters.
- Or show it right in the terminal
qrencode -t ansiutf8 "https://example.com"Handy for scanning straight off the screen with your phone.
- Make one that joins your Wi-Fi
qrencode -o wifi.png -s 10 "WIFI:T:WPA;S:MyNetwork;P:MyPassword;;"Replace MyNetwork and MyPassword. Phones offer to join the network when they scan it.
Check it worked
- Open the picture
open qr.pngPoint your phone camera at it. It should offer to open the link.
- Or read it back in the terminal
brew install zbar && zbarimg qr.pngPrints what the code says, like QR-Code:https://example.com.
Undo it
- Delete the picture
rm qr.png
- Install qrencode (Ubuntu and Debian)
sudo apt install qrencodeFedora: sudo dnf install qrencode.
- Make the QR code picture
qrencode -o qr.png -s 10 "https://example.com"-s 10 makes each square 10 pixels, big enough to print. Use a bigger number for posters.
- Or show it right in the terminal
qrencode -t ansiutf8 "https://example.com"Handy for scanning straight off the screen with your phone.
- Make one that joins your Wi-Fi
qrencode -o wifi.png -s 10 "WIFI:T:WPA;S:MyNetwork;P:MyPassword;;"Replace MyNetwork and MyPassword. Phones offer to join the network when they scan it.
Check it worked
- Open the picture
xdg-open qr.pngPoint your phone camera at it. It should offer to open the link.
- Or read it back in the terminal
sudo apt install zbar-tools && zbarimg qr.pngPrints what the code says, like QR-Code:https://example.com.
Undo it
- Delete the picture
rm qr.png
- Install the qrcode tool with Python
pip install "qrcode[pil]"Needs Python. If pip isn't found, install Python first.
- Make the QR code picture
qr --output qr.png "https://example.com" - Or show it right in the terminal
qr "https://example.com"Handy for scanning straight off the screen with your phone.
- Make one that joins your Wi-Fi
qr --output wifi.png "WIFI:T:WPA;S:MyNetwork;P:MyPassword;;"Replace MyNetwork and MyPassword. Phones offer to join the network when they scan it.
Check it worked
- Open the picture
start qr.pngPoint your phone camera at it. It should offer to open the link.
Undo it
- Delete the picture
del qr.png

New to QR code? I explain it in plain English on Layman Terms.