# to encode text into a qr image
apt install qrencode
# to decode an image into the text value
apt install zbar-tools
Usage for the installed tools
# generate and display a QR code
qrencode "Hi This is my 2d code." -o 2d.png
display 2d.png
# parse an QR image file to text
zbarimg 2d.png
>>> QR-Code:Hi This is my 2d code.
>>> scanned 1 barcode symbols from 1 images in 0 second